[Issue 6408] New: string[].init gives a wrong type

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jul 30 06:56:08 PDT 2011


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

           Summary: string[].init gives a wrong type
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2011-07-30 06:56:07 PDT ---
I think this D2 code shows an error:

import std.stdio;
void main() {
    writeln(typeid(typeof(string[].init)));
    writeln(typeid(typeof(string[][].init)));
    writeln(typeid(typeof(string[][][].init)));
    writeln(typeid(typeof((string[]).init)));
}


Output, DMD 2.054:
immutable(char)[]
immutable(char)[]
immutable(char)[]
immutable(char)[][]

-- 
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