www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2013] New: Dynamic cast is incorrect in some cases

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2013

           Summary: Dynamic cast is incorrect in some cases
           Product: D
           Version: 1.028
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: dvdfrdmn users.sf.net


When a class implements an interface that has re-implemented an ancestor
interface, it is possible for a dynamic cast to produce the wrong result.

I have this tagged as "wrong-code", but I believe the problem is due to both
InterfaceDeclaration RTTI and the implementation of
phobos/internal/cast.d:_d_isbaseof2.


-- 
Apr 19 2008
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2013





------- Comment #1 from dvdfrdmn users.sf.net  2008-04-19 12:19 -------
Created an attachment (id=248)
 --> (http://d.puremagic.com/issues/attachment.cgi?id=248&action=view)
Test Cast


-- 
Apr 19 2008