Bug 10756 – "has no effect in expression" error message with correct type name
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-08-04T10:38:23Z
Last change time
2018-05-12T13:04:35Z
Keywords
trivial
Assigned to
No Owner
Creator
bearophile_hugs
Comments
Comment #0 by bearophile_hugs — 2013-08-04T10:38:23Z
A low priority enhancement request (in Bugzilla I'd like to be able to give an importance high, or low, to enhancement requests too):
void main() {
'a';
1;
2U;
3UL;
4.0f;
}
dmd 2.064alpha gives:
test.d(2): Error: long has no effect in expression ('a')
test.d(3): Error: long has no effect in expression (1)
test.d(4): Error: long has no effect in expression (2u)
test.d(5): Error: long has no effect in expression (3LU)
test.d(6): Error: double has no effect in expression (4.00000)
I think those error messages should be improved a little, printing the correct type name.