[Issue 10478] Crappy error message when two operator overloads match
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri Jul 21 02:33:40 PDT 2017
https://issues.dlang.org/show_bug.cgi?id=10478
Vladimir Panteleev <dlang-bugzilla at thecybershadow.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
--- Comment #1 from Vladimir Panteleev <dlang-bugzilla at thecybershadow.net> ---
The test case above now incorrectly compiles due to issue 17674, but the bug
here can still be observed with the old opXXX operator overloading method.
//////////////// test.d ///////////////
struct S1
{
int opAdd(S2 other) { return 3; }
}
struct S2
{
int opAdd_r(S1 other) { return 3; }
}
void main()
{
auto x = S1.init + S2.init;
}
///////////////////////////////////////
--
More information about the Digitalmars-d-bugs
mailing list