Mercurial > projects > ldc
annotate tangotests/b.d @ 149:4c577c2b7229 trunk
[svn r155] Fixed a bunch of linkage problems (especially with templates)
author | lindquist |
---|---|
date | Mon, 24 Mar 2008 19:43:02 +0100 |
parents | 1700239cab2e |
children | 68a7dd38c03c |
rev | line source |
---|---|
132 | 1 class C |
2 { | |
3 int a; | |
4 union | |
5 { | |
6 int i; | |
7 double d; | |
8 } | |
9 int z; | |
10 } | |
11 | |
12 void func() | |
13 { | |
14 scope c = new C; | |
15 access1(c); | |
16 assert(c.i == 42); | |
17 access2(c); | |
18 assert(c.d == 2.5); | |
19 } | |
20 | |
21 void access1(C c) | |
22 { | |
23 c.i = 42; | |
24 } | |
25 | |
26 void access2(C c) | |
27 { | |
28 c.d = 2.5; | |
29 } |