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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1068
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
1 // $HeadURL$
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
2 // $Date$
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
3 // $Author$
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
4
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
5 // @author@ <h3r3tic@mat.uni.torun.pl>
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
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
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
8
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
9 module dstress.run.t.template_36_C;
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
10
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
11 int status;
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
12
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
13 struct S{
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
14 int i;
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
15 }
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
16
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
17 template t(){
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
18 template foo(){
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
19 void foo(S s){
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
20 status = s.i + 1;
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
21 }
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
22 }
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
23
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
24 void bar(S s){
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
25 foo!()(s);
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
26 }
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
27 }
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
28
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
29
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
30 class Child {
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
31 this() {
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
32 }
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
33
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
34 mixin t!() mixed;
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
35 }
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
36
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
37 int main(){
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
38 Child c = new Child();
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
39
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
40 S s;
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
41 s.i = 3;
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
42
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
43 c.mixed.bar(s);
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
44
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
45 if(status != 4){
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
46 assert(0);
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
47 }
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
48
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
49 return 0;
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
50 }
d892c90166f0 <h3r3tic@mat.uni.torun.pl>
thomask
parents:
diff changeset
51