https://issues.dlang.org/show_bug.cgi?id=13818
Issue ID: 13818
Summary: Unhelpful error message for rvalue reference:
incompatible types for ((S()) + (S())): 'S' and 'S'
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: DMD
Assignee: [email protected]
Reporter: [email protected]
struct S
{
void opBinary(string op)(ref S rhs)
{}
}
void main()
{
auto result = S() + S();
}
Error: incompatible types for ((S()) + (S())): 'S' and 'S'
The message is bogus because S is compatible with S. ;)
--