[Issue 9435] New: regression(head): forward reference error
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Jan 31 13:55:54 PST 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9435
Summary: regression(head): forward reference error
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: regression
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: timon.gehr at gmx.ch
--- Comment #0 from timon.gehr at gmx.ch 2013-01-31 13:55:53 PST ---
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.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list