Spec bug or dmd bug?

Christopher Wright dhasenan at gmail.com
Sun Dec 2 17:53:02 PST 2007

struct Interface;
     Information about an interface. A pointer to this appears as the 
first entry in the interface's vtbl[].

interface IFoo { void foo(); }

auto a = IFoo.classinfo.vtbl[0]; // array bounds exception
writefln("%x", IFoo.classinfo.vtbl.ptr); // prints '0'

Using dmd 2.008.

More information about the Digitalmars-d-learn mailing list