http://d.puremagic.com/issues/show_bug.cgi?id=4030
Summary: Better object array literal type inference Product: D Version: future Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2010-03-30 02:59:07 PDT --- In the following D2 program the compiler can refuse the line 6, because it must refuse to guess (if p1 is an array of A or B). But at line 7 the compiler has enough information to not guess (it's an array of A), so line 7 can be accepted by the compiler: class A {} class B : A {} final class C1 : B {} final class C2 : B {} void main() { auto p1 = [new C1, new C2]; // line 6, don't guess A[] p2 = [new C1, new C2]; // line 7, no need to guess } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------