http://d.puremagic.com/issues/show_bug.cgi?id=7470


Steven Schveighoffer <schvei...@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |schvei...@yahoo.com


--- Comment #1 from Steven Schveighoffer <schvei...@yahoo.com> 2012-02-09 
07:36:48 PST ---
The original test case was that I could not compare two interfaces in the way
you say, yes.  But you can compare two interfaces via Object:

interface I
{
}

class C : I
{
}

void main()
{
   I i1 = new C, i2 = new C;
   assert(i1 == i2); // should work now, did not work before
}

Prior to the fix, you could not compare two interfaces under *any
circumstances*.  This at least allows interfaces to pull in Object's method for
opEquals.

What you are asking for is for interfaces (and by extension objects) to be
comparable to other objects using a derived type, which I think could be a
useful addition, but complex in implementation.  You don't want to get into a
situation where two objects compare differently depending on the static type
used.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to