Invalid code, accidentally reduced from Issue8785: mixin template Mixin() { } struct S { template t1() { mixin Mixin t1; } } void main() { S s1; s1.t1!(); } 2.060: $ dmd test.d > test.d(7): Error: mixin test.S.t1().Mixin!() cannot resolve forward reference > test.d(14): Error: expression has no value 2.061: $ dmd test.d > Stack overflow
(In reply to comment #0) > Invalid code, accidentally reduced from Issue8785: Actually I don't know whether it's invalid, but the stack overflow was found by accident.
Introduced by: https://github.com/d-programming-language/dmd/commit/9b4c8ee52edfbeef40442219b877a64a051018c3 https://github.com/D-Programming-Language/dmd/pull/1197
https://github.com/D-Programming-Language/dmd/pull/1576 (In reply to comment #0) > 2.060: > $ dmd test.d > > test.d(7): Error: mixin test.S.t1().Mixin!() cannot resolve forward reference > > test.d(14): Error: expression has no value In the code, there is no forward reference. So, the error "cannot resolve forward reference" is not correct.
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/fb0aca7d5c7d103ea545574101355282edeba90b fix Issue 9406 - (Regression: 2.061) Stack overflow from a forward reference error https://github.com/D-Programming-Language/dmd/commit/6bb0a54cb8656c6debaac733118036ec3f48bbc6 Merge pull request #1576 from 9rnsr/fix9406 Issue 9406 - (Regression: 2.061) Stack overflow from a forward reference error