Bug 9709 – ice with template and alias this

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-03-13T10:20:00Z
Last change time
2013-03-13T10:42:07Z
Keywords
ice
Assigned to
nobody
Creator
zheny

Comments

Comment #0 by zheny — 2013-03-13T10:20:03Z
This code fails with message dmd: aliasthis.c:100: virtual void AliasThis::semantic(Scope*): Assertion `t' failed. import std.stdio; struct Tuple(T...) { alias T expand; alias expand this; } template Foo(alias A,alias B) { static assert(is(A == Tuple!(1,int,"foo"))); static assert(is(B == Tuple!(2,double,"bar"))); static int dummy = 0; } void main() { alias Tuple!(1,int,"foo") A; alias Tuple!(2,double,"bar") B; writeln(Foo!(A,B).dummy); }
Comment #1 by zheny — 2013-03-13T10:42:07Z
*** This issue has been marked as a duplicate of issue 8735 ***