Mercurial > projects > dstress
annotate run/t/template_36_C.d @ 1320:daef239f37cf
sed'ed replacement of new:...http.d.puremagic.com/issues/ with http://d.puremagic.com/issues/show_bug.cgi?...
author | thomask |
---|---|
date | Sun, 31 Dec 2006 19:59:08 +0000 |
parents | d892c90166f0 |
children |
rev | line source |
---|---|
1068 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 // @author@ <h3r3tic@mat.uni.torun.pl> | |
6 // @date@ 2006-06-22 | |
1320
daef239f37cf
sed'ed replacement of new:...http.d.puremagic.com/issues/ with http://d.puremagic.com/issues/show_bug.cgi?...
thomask
parents:
1068
diff
changeset
|
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=216 |
1068 | 8 |
9 module dstress.run.t.template_36_C; | |
10 | |
11 int status; | |
12 | |
13 struct S{ | |
14 int i; | |
15 } | |
16 | |
17 template t(){ | |
18 template foo(){ | |
19 void foo(S s){ | |
20 status = s.i + 1; | |
21 } | |
22 } | |
23 | |
24 void bar(S s){ | |
25 foo!()(s); | |
26 } | |
27 } | |
28 | |
29 | |
30 class Child { | |
31 this() { | |
32 } | |
33 | |
34 mixin t!() mixed; | |
35 } | |
36 | |
37 int main(){ | |
38 Child c = new Child(); | |
39 | |
40 S s; | |
41 s.i = 3; | |
42 | |
43 c.mixed.bar(s); | |
44 | |
45 if(status != 4){ | |
46 assert(0); | |
47 } | |
48 | |
49 return 0; | |
50 } | |
51 |