Bug 6567 – Type deduction of empty array literal is inconsistent

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2011-08-27T22:12:00Z
Last change time
2011-08-28T21:39:56Z
Keywords
rejects-valid
Assigned to
nobody
Creator
k.hara.pg

Comments

Comment #0 by k.hara.pg — 2011-08-27T22:12:38Z
This code fails to compile, but it shouldn't. void foo1(Object[] a){} void foo2()(Object[] a){} void foo3(T)(T[] a){} void bar1(Object[][] a){} void bar2()(Object[][] a){} void bar3(T)(T[][] a){} void main() { foo1([]); // OK foo2([]); // NG foo3([]); // OK, T == void bar1([[]]); // OK bar2([[]]); // NG bar3([[]]); // OK, T == void }
Comment #1 by yebblies — 2011-08-28T21:39:56Z
*** This issue has been marked as a duplicate of issue 4953 ***