Bug 13320 – Redundant error messages for missing operation on struct instance
Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-08-18T12:49:00Z
Last change time
2017-07-19T17:38:50Z
Keywords
diagnostic, pull
Assigned to
nobody
Creator
bearophile_hugs
Comments
Comment #0 by bearophile_hugs — 2014-08-18T12:49:19Z
I think one error message suffices here, they seem to say something similar here:
struct Foo {}
void main() {
Foo f;
++f;
}
2.067alpha gives:
test.d(4,5): Error: 'f += 1' is not a scalar, it is a Foo
test.d(4,5): Error: incompatible types for ((f) += (1)): 'Foo' and 'int'
I think the second error message suffices.