annotate run/a/alias_31_B.d @ 826:2559f0f5baad

Sean Kelly <sean@f4.ca> 2006-02-09 news:dsgai7$2cvr$1@digitaldaemon.com
author thomask
date Sun, 12 Feb 2006 08:21:34 +0000
parents
children 9dcac8d4e97f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
826
2559f0f5baad Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
1 // $HeadURL$
2559f0f5baad Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
2 // $Date$
2559f0f5baad Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
3 // $Author$
2559f0f5baad Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
4
2559f0f5baad Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
5 // @author@ Sean Kelly <sean@f4.ca>
2559f0f5baad Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
6 // @date@ 2006-02-09
2559f0f5baad Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
7 // @uri@ news:dsgai7$2cvr$1@digitaldaemon.com
2559f0f5baad Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
8
2559f0f5baad Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
9 module dstress.run.a.alias_31_B;
2559f0f5baad Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
10
2559f0f5baad Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
11 struct StructOf(Type){
2559f0f5baad Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
12 Type val;
2559f0f5baad Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
13
2559f0f5baad Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
14 template ref(){
2559f0f5baad Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
15 alias val ref;
2559f0f5baad Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
16 }
2559f0f5baad Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
17 }
2559f0f5baad Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
18
2559f0f5baad Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
19 int main(){
2559f0f5baad Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
20 auto c = new StructOf!(int)();
2559f0f5baad Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
21 int x = 3;
2559f0f5baad Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
22
2559f0f5baad Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
23 c.ref!() = x;
2559f0f5baad Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
24
2559f0f5baad Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
25 if(c.ref!() == 3){
2559f0f5baad Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
26 return 0;
2559f0f5baad Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
27 }
2559f0f5baad Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
28 }
2559f0f5baad Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
29