[Issue 4979] Implementing an interface twice results in different a reference for each interface

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Sep 6 09:07:25 UTC 2020


Basile-z <b2.temp at gmx.com> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
                 CC|                            |b2.temp at gmx.com
         Resolution|---                         |INVALID

--- Comment #4 from Basile-z <b2.temp at gmx.com> ---
D is is not the same as c# and others. On reference types this is more to
perform a simple address comparison, exp when opEquals is overloaded.

The assert should be rather

  assert(typeid(foo1) is typeid(foo2))

but unfortunately typeid() on interfaces currently has a embarrassing bug, it
returns a TypeInfo_Class, not a TypeInfo_Interface.


More information about the Digitalmars-d-bugs mailing list