[Issue 13818] New: Unhelpful error message for rvalue reference: incompatible types for ((S()) + (S())): 'S' and 'S'
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Dec 4 10:45:09 PST 2014
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: nobody at puremagic.com
Reporter: acehreli at yahoo.com
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. ;)
--
More information about the Digitalmars-d-bugs
mailing list