Mercurial > projects > dstress
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 |
rev | line source |
---|---|
826 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 // @author@ Sean Kelly <sean@f4.ca> | |
6 // @date@ 2006-02-09 | |
7 // @uri@ news:dsgai7$2cvr$1@digitaldaemon.com | |
8 | |
9 module dstress.run.a.alias_31_B; | |
10 | |
11 struct StructOf(Type){ | |
12 Type val; | |
13 | |
14 template ref(){ | |
15 alias val ref; | |
16 } | |
17 } | |
18 | |
19 int main(){ | |
20 auto c = new StructOf!(int)(); | |
21 int x = 3; | |
22 | |
23 c.ref!() = x; | |
24 | |
25 if(c.ref!() == 3){ | |
26 return 0; | |
27 } | |
28 } | |
29 |