https://issues.dlang.org/show_bug.cgi?id=23814
--- Comment #5 from naydef <[email protected]> --- I've made the following example (without the patch the generated executable crashes): app.d -------------------------------------- extern(C++) interface BaseInterface1 { public: int func1(); int func2(); } extern(C++) abstract class BaseInterface2 { public: int func3() {return 3;} int func4() {return 4;} } extern(C++) class MainClass : BaseInterface2, BaseInterface1 { override int func1() {return 1;} override int func2() {return 2;} } extern(C++) void cppFunc1(BaseInterface1 obj); void main() { BaseInterface1 cls = new MainClass(); cppFunc1(cls); } -------------------------------------- app2.cpp -------------------------------------- class BaseInterface1 { public: virtual int func1(); virtual int func2(); }; class BaseInterface2 { public: virtual int func3(); virtual int func4(); }; class MainClass : BaseInterface2, BaseInterface1 { virtual int func1(); virtual int func2(); }; void cppFunc1(BaseInterface1* obj) { int a = obj->func1(); int b = obj->func2(); } -------------------------------------- The executable is generated with the following command: gcc -m32 -O -c app2.cpp -o app2.o;dmd app.d app2.o -m32 Feel free to comment on the code. --
