http://d.puremagic.com/issues/show_bug.cgi?id=3849
Summary: [missing error] Array literal length doesn't match Product: D Version: 2.040 Platform: All OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2010-02-24 01:56:19 PST --- This small program compiles, but I'd like the compiler to raise a compile error, because I think this is often a bug: string[4] arr = ["foo", "bar"]; void main() {} ------------ A related enhancement: when I want to define a fixed-sized array with a literal and the number of its items is high, I may not want to count them. In this situation the following syntax can be adopted: int[$] arr = [10,2,15,15,14,12,3,7,13,5,9,9,7,9,9,9,11,15,1,1,12,5,14]; -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------