www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11178] New: Class may implement same interface multiple times with different interface pointers, breaking (a is b) semantics

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

           Summary: Class may implement same interface multiple times with
                    different interface pointers, breaking (a is b)
                    semantics
           Product: D
           Version: D1 & D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: default_357-line yahoo.de



16:27:12 PDT ---
Consider https://gist.github.com/6847299 . The errant behavior goes away if you
remove the I2 inheritance from C2, indicating that C2 implements I2 _twice_
with different interface pointers. This leads to hilariously hard-to-find
errors, since one generally assumes that casting two objects to the same
interface makes them is-comparable if they're the same object. The second I2 in
C2 should either be made illegal or silently ignored.

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