Mercurial > projects > dstress
annotate run/t/template_36_B.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_B; | |
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 Parent { | |
31 this() { | |
32 } | |
33 } | |
34 | |
35 | |
36 class Child : Parent { | |
37 mixin t!() mixed; | |
38 } | |
39 | |
40 int main(){ | |
41 Child c = new Child(); | |
42 | |
43 S s; | |
44 s.i = 3; | |
45 | |
46 c.mixed.bar(s); | |
47 | |
48 if(status != 4){ | |
49 assert(0); | |
50 } | |
51 | |
52 return 0; | |
53 } | |
54 |