http://d.puremagic.com/issues/show_bug.cgi?id=9980

           Summary: [CTFE] Allow interpreting function with variable
                    arguments when their values aren't used
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from Denis Shelomovskij <[email protected]> 2013-04-23 
13:56:57 MSD ---
---
int f(int)
{
    return 1;
}

int g(bool first, int a, int b)
{
    return first ? a : b;
}

void main()
{
    int i;
    static assert(f(i) == 1);
    static assert(g(true, 2, i) == 2);
    static assert(g(false, i, 3) == 3);
}
---

Currently code fails with "variable i cannot be read at compile time" errors.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to