[Issue 9434] New: regression(head): template mixin contents mixed in multiple times
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Jan 31 13:54:08 PST 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9434
Summary: regression(head): template mixin contents mixed in
multiple times
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
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:54:06 PST ---
To reproduce: dmd expression.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:
semantic.d(4): Error: function
expression.Node.Visitors!().Semantic!(Node).__invariant more than one invariant
for Node
expression.d(2): Error: mixin expression.Node.Visitors!().Semantic!(Node) error
instantiating
expression.d(3): Error: mixin expression.Node.Visitors!() error instantiating
This worked with DMD 2.060. (I assume that the bug was present before, as I
have had similar issues before, and it surfaces because the analysis order is
different.)
--
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