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.
Comment #1 by slavo5150 — 2017-11-10T23:53:37Z
Comment #2 by github-bugzilla — 2017-11-11T01:03:09Z
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/f521dd920bf793e0ca3d370335dcffdcbecad866 Issue 10756 - 'has no effect in expression' error message with correct type name https://github.com/dlang/dmd/commit/311c7f8f0d045fa02d5bc2aa9f4edfe4d47152d1 Merge pull request #7300 from JinShil/fix10756 Issue 10756 - 'has no effect in expression' error message with correc… merged-on-behalf-of: Walter Bright <[email protected]>
Comment #3 by github-bugzilla — 2017-12-18T22:56:51Z
Commits pushed to stable at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/f521dd920bf793e0ca3d370335dcffdcbecad866 Issue 10756 - 'has no effect in expression' error message with correct type name https://github.com/dlang/dmd/commit/311c7f8f0d045fa02d5bc2aa9f4edfe4d47152d1 Merge pull request #7300 from JinShil/fix10756