--- class C { bool b() {return true;} } struct S { C c; } bool test() { S s = S(new C); return s.c.b; } static assert(test()); --- Gives "dmd: interpret.c:4643: virtual Expression* CallExp::interpret(InterState*, CtfeGoal): Assertion `thisval && thisval->op == ((TOK)(TOKMAX+1))' failed." These variations don't give errors: --- bool test() { return S(new C).c.b; } bool test() { S s = S(new C); C c = s.c; return c.b; } ---
https://github.com/D-Programming-Language/dmd/commit/15039d5284922ac673023da65827460972ba60b3 https://github.com/D-Programming-Language/dmd/commit/3c95d9e1308ba60312947400c5ac02d4f7c4c410