Bug 9406 – (Regression: 2.061) Stack overflow from a forward reference error

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-01-26T15:08:00Z
Last change time
2013-01-29T13:47:08Z
Keywords
ice, pull
Assigned to
nobody
Creator
andrej.mitrovich

Comments

Comment #0 by andrej.mitrovich — 2013-01-26T15:08:31Z
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
Comment #1 by andrej.mitrovich — 2013-01-26T15:10:22Z
(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.
Comment #2 by k.hara.pg — 2013-01-28T07:25:08Z
Comment #3 by k.hara.pg — 2013-01-29T00:01:17Z
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.
Comment #4 by github-bugzilla — 2013-01-29T12:15:39Z
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