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

           Summary: [] should have a type of its own
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: timon.g...@gmx.ch


--- Comment #0 from timon.g...@gmx.ch 2011-11-25 13:20:47 PST ---
Now that null has an own type (issue 5416), typeof([]) == void[] is
inconsistent.

Consider:

void foo(int[] x){}

void bar(T)(T x){foo(x);}


void main(){
    foo(null); // ok
    foo([]);   // ok
    bar(null); // ok!
    bar([]);   // fail
}

This example should compile.

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

Reply via email to