Bug 6618 – TypeInfo_Struct.equals should prefer xopEquals than pointer equality
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
druntime
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2011-09-07T03:10:00Z
Last change time
2011-10-10T15:57:00Z
Keywords
patch, rejects-valid
Assigned to
nobody
Creator
k.hara.pg
Comments
Comment #0 by k.hara.pg — 2011-09-07T03:10:17Z
Following code should pass the assertion.
void main()
{
struct S
{
const bool opEquals(ref const S rhs)
{
return false;
}
}
S s;
assert(!typeid(S).equals(&s, &s));
}