[Issue 1365] New: wchar/dchar in foreach causes CTFE to fail

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jul 23 03:27:30 PDT 2007


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

           Summary: wchar/dchar in foreach causes CTFE to fail
           Product: D
           Version: 1.019
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: samukha at voliacable.com


Is it supposed to work? If not, the specs should be put in sync.

char[] foo()
{
    char[] s = "a string";

    foreach (dchar c; s)
    {
    }

    return "";
}

void main(char[][] args)
{
    static x = foo();
}


-- 



More information about the Digitalmars-d-bugs mailing list