[Issue 2477] Trailing comma in array literal sometimes accepted, sometimes not
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Nov 30 17:20:40 PST 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2477
smjg at iname.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |smjg at iname.com
Keywords| |diagnostic, spec
------- Comment #1 from smjg at iname.com 2008-11-30 19:20 -------
The problem is that the spec is inconsistent. In the first case, it's not an
array literal, but an array initializer.
ArrayInitializer:
[ ]
[ ArrayMemberInitializations ]
ArrayMemberInitializations:
ArrayMemberInitialization
ArrayMemberInitialization ,
ArrayMemberInitialization , ArrayMemberInitializations
versus
ArrayLiteral:
[ ArgumentList ]
ArgumentList:
AssignExpression
AssignExpression , ArgumentList
Making these consistent is technically an enhancement request rather than a
bug. I nearly set this to enhancement, but the second issue (repetition of the
error message) qualifies as a bug IMO.
--
More information about the Digitalmars-d-bugs
mailing list