Bug 9435 – regression(head): 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-31T13:55:00Z
Last change time
2013-01-31T19:49:27Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
timon.gehr

Comments

Comment #0 by timon.gehr — 2013-01-31T13:55:53Z
To reproduce: dmd semantic.d // expression.d: import semantic; template Visitors(){ mixin Semantic!(typeof(this)); } class Node{ mixin Visitors; } class Expression: Node{ } class BinaryExp(TokenType op): Expression{ } // --- // semantic.d: import expression; enum TokenType{Dot} template Tok(string type){enum Tok=TokenType.Dot;} template Semantic(T) { invariant(){ } } template Semantic(T) if(is(T==BinaryExp!(Tok!"."))){ } // === Output with dmd from head: expression.d(4): Error: class expression.Expression unable to resolve forward reference in definition expression.d(5): Error: class expression.BinaryExp!(cast(TokenType)0).BinaryExp unable to resolve forward reference in definition expression.d(3): Error: class expression.Node unable to resolve forward reference in definition This worked with DMD 2.060.
Comment #1 by k.hara.pg — 2013-01-31T16:47:15Z
This regression is introduced by fixing bug 9276. https://github.com/D-Programming-Language/dmd/pull/1589
Comment #2 by k.hara.pg — 2013-01-31T16:52:36Z
*** Issue 9434 has been marked as a duplicate of this issue. ***