[Issue 13320] New: Redundant error messages for missing operation on struct instance

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Aug 18 05:49:19 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=13320

          Issue ID: 13320
           Summary: Redundant error messages for missing operation on
                    struct instance
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Keywords: diagnostic
          Severity: minor
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: bearophile_hugs at eml.cc

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.

--


More information about the Digitalmars-d-bugs mailing list