[Issue 12304] New: `TypeInfo_AC` sometimes is called for array of interfaces

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Mar 6 03:47:26 PST 2014


https://d.puremagic.com/issues/show_bug.cgi?id=12304

           Summary: `TypeInfo_AC` sometimes is called for array of
                    interfaces
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: verylonglogin.reg at gmail.com


--- Comment #0 from Denis Shelomovskij <verylonglogin.reg at gmail.com> 2014-03-06 15:47:25 MSK ---
`TypeInfo_AC` is a `TypeInfo` sometimes (see Issue 12303) used for arrays of
classes or interfaces. But it isn't designed to work with interfaces, so we
have wrong code e.g. here:
---
interface I { }
class C: I { }

void main()
{
    I[] a = [new C];
    int[I[]] aa = [a : 0];
    assert(a in aa); // fails
}
---

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


More information about the Digitalmars-d-bugs mailing list