[Issue 5290] Static array literals with too few elements

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Sep 9 11:32:10 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=5290



--- Comment #6 from bearophile_hugs at eml.cc 2011-09-09 11:31:56 PDT ---
(In reply to comment #5)

> ??? Pull 375 rejects statically above code, it is expected behavior from this
> issue.

I see. I suggest you to read the whole thread of bug 3849.

Code like the following is working as designed, so if your patch refuses this
code, then your patch is implementing an enhancement too (it means it's
changing the D specs):

int[3] arr = [1, 2];
void main() {}


Note that I support turning this kind of code into a compile-time error, but
Walter (used to) wants it to compile. So at least I suggest your comment of
Pull 375 to say this example is now a compile-time error.

-- 
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