D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 6618 - TypeInfo_Struct.equals should prefer xopEquals than pointer equality
Summary: TypeInfo_Struct.equals should prefer xopEquals than pointer equality
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: druntime (show other issues)
Version: D2
Hardware: Other Windows
: P2 normal
Assignee: No Owner
URL:
Keywords: patch, rejects-valid
Depends on:
Blocks:
 
Reported: 2011-09-07 03:10 UTC by Kenji Hara
Modified: 2011-10-10 15:57 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Kenji Hara 2011-09-07 03:10:17 UTC
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));
}