www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1365] New: wchar/dchar in foreach causes CTFE to fail

reply d-bugmail puremagic.com writes:
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 digitalmars.com
        ReportedBy: samukha 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();
}


-- 
Jul 23 2007
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1365


bugzilla digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED





Fixed dmd 1.021 and 2.004


-- 
Sep 28 2007