[Issue 5396] New: Invalid code with nested functions in CTFE

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jan 1 10:57:06 PST 2011


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

           Summary: Invalid code with nested functions in CTFE
           Product: D
           Version: D1 & D2
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: robert at octarineparrot.com


--- Comment #0 from Robert Clipsham <robert at octarineparrot.com> 2011-01-01 18:54:57 GMT ---
The following code:
----
void outer(bool b)
{
    string inner()
    {
        if (b)
        {
            return "true";
        }
        else
        {
            return "false";
        }
    }
    pragma(msg, inner());
}
----
Compiles and evaluates without error, despite the dependence on the runtime
value b.

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


More information about the Digitalmars-d-bugs mailing list