[Issue 11094] Disuniform error messages with overloaded + and ^ operators
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Apr 27 12:43:07 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=11094
Andrej Mitrovic <andrej.mitrovich at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |andrej.mitrovich at gmail.com
--- Comment #1 from Andrej Mitrovic <andrej.mitrovich at gmail.com> ---
Note that it is unrelated to the overloads, you could have a single opBinary to
reproduce:
-----
struct Foo
{
Foo opBinary(string op)(in Foo r) if (op == "+" || op == "^")
{
return Foo();
}
}
void main()
{
const x = Foo();
auto r1 = x + Foo();
auto r2 = x ^ Foo();
}
-----
--
More information about the Digitalmars-d-bugs
mailing list