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.
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