www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10478] New: Crappy error message when two operator overloads match

http://d.puremagic.com/issues/show_bug.cgi?id=10478

           Summary: Crappy error message when two operator overloads match
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: simen.kjaras gmail.com



PDT ---
struct S1 {
    int opBinary(string op)(S2 other) {
        return 3;
    }
}

struct S2 {
    int opBinaryRight(string op)(S1 other) {
        return 4;
    }
}

void main( ) 
    S1.init + S2.init;
}

foo.d(97): Error: overloads pure nothrow  safe int(S2 other) and pure nothrow
 safe int(S1 other) both match argument list for opBinary


I would really like to see some more information here - FQN and line numbers
would go a long way.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 26 2013