http://d.puremagic.com/issues/show_bug.cgi?id=8374
Summary: One missed array literal interpretation as int[2] Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2012-07-10 15:18:42 PDT --- I am not sure, but I think this code is correct: struct Foo { int[2] bar; } const(int[2]) spam() { const Foo* x; return true ? x.bar : [10, 20]; } void main() {} But DMD 2.060alpha gives: test.d(6): Error: cannot implicitly convert expression (cast(const(int)[])(*x).bar) of type const(int)[] to const(int[2u]) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------