DMD crashes with assertion failure: $ dmd -c test.d core.exception.AssertError@todt.d(795): Assertion failure Also if we comment out line 14, we get: $ dmd -c test.d dmd: toobj.c:358: virtual void toObjFile(Dsymbol*, bool)::ToObjFile::visit(ClassDeclaration*): Assertion `cd->structsize >= 8 || (cd->cpp && cd->structsize >= 4)' failed. Aborted class Foo(L) { // 1 FooFoo!L foofoo; // 2 alias U = typeof(frop); // 3 Object obj = null; // 4 auto frop() { // 5 foofoo.frop; // 6 } // 7 } // 8 class FooFooFoo(M) { // 9 alias Zoo = Foo!(M); // 10 } // 11 class FooFoo(M) : FooFooFoo!(M) { // 12 bool frop() {return false;} // 13 Zoo zoo() {return new Zoo;} // 14 } // 15 class Bar { // 16 class Solver { // 17 auto boo(L)(L l) { // 18 new FooFoo!L(); // 19 } // 20 void bar() { // 21 boo(foo); // 22 } // 23 } // 24 byte[] foo ; // 25 } // 26
Can't reproduce on git HEAD. Tested on Linux/64. Perhaps this has been fixed since?
Yes, fixed at some point, see https://run.dlang.io/is/SdERou