[Issue 7007] New: [] should have a type of its own
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Nov 25 13:21:44 PST 2011
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: nobody at puremagic.com
ReportedBy: timon.gehr at gmx.ch
--- Comment #0 from timon.gehr at 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: -------
More information about the Digitalmars-d-bugs
mailing list