[dmd-internals] where do forward reference errors originate?
Trass3r
mrmocool at gmx.de
Tue Jun 8 03:56:17 PDT 2010
There is this bug that is blocking my coding:
http://d.puremagic.com/issues/show_bug.cgi?id=4267
alias Bar Bar2; // but the second one doesn't
alias Foo!(1) Bar; // 1 alias "level" works
//alias Bar Bar2; // putting it behind the 1st alias makes it work
template Foo(uint ver) {}
ddraw.d(1): Error: forward reference to 'Foo!(1)'
IIRC the error is "thrown" at mtype.c:5532 (TypeQualified::resolveHelper):
if (t->ty == Tinstance && t != this && !t->deco)
{ error(loc, "forward reference to '%s'", t->toChars());
return;
}
I read that the check for deco means checking if semantic analysis has
already been run.
So if this gives an error instead of calling t->semantic() I guess the
root of the error is elsewhere?
More information about the dmd-internals
mailing list