www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13320] New: Redundant error messages for missing operation on

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 puremagic.com
          Reporter: bearophile_hugs 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.

--
Aug 18 2014