comparison run/t/template_54_A.d @ 1299:38be9fe455e2

[Issue 619] Alias of templated struct instance crashes 0.175 Kirk McDonald <kirklin.mcdonald@gmail.com> 2006-11-29 http://d.puremagic.com/issues/show_bug.cgi?id=619
author thomask
date Sun, 31 Dec 2006 01:59:07 +0000
parents
children
comparison
equal deleted inserted replaced
1298:da2ca77aec83 1299:38be9fe455e2
1 // $HeadURL$
2 // $Date$
3 // $Author$
4
5 // @author@ Kirk McDonald <kirklin.mcdonald@gmail.com>
6 // @date@ 2006-11-29
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=619
8 // @desc@ [Issue 619] Alias of templated struct instance crashes 0.175
9
10
11 module dstress.run.t.template_54_A;
12
13 struct Foo {
14 int i;
15 }
16
17 template Bar(T) {
18 static Foo Bar = { 5 };
19 }
20
21 void dummy(int x){
22 if(x != 5){
23 assert(0);
24 }
25 }
26
27 int main() {
28 alias Bar!(int) inst;
29 dummy(inst.i);
30 return 0;
31 }