Bug 11759 – Poor error message trying to use lowercase L in literal suffix.
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-12-17T13:23:00Z
Last change time
2013-12-19T05:47:41Z
Keywords
diagnostic, pull
Assigned to
nobody
Creator
peter.alexander.au
Comments
Comment #0 by peter.alexander.au — 2013-12-17T13:23:12Z
ulong x = 123ul;
ul.d(1): Error: semicolon expected, not 'l'
ul.d(1): Error: no identifier for declarator l
D, unlike C/C++, requires uppercase L for the suffix.
I think this will be a common enough mistake, and easy/unambiguous to detect, so I believe it deserves a better error message. Something along the lines of "Error: uppercase L required for long integer suffix".