Mercurial > projects > ldc
annotate tangotests/b.d @ 324:c542d12017e5 trunk
[svn r345] Fixed the new moduleinfo stuff to have consistent symbol names with the D style.
author | lindquist |
---|---|
date | Thu, 10 Jul 2008 00:13:09 +0200 |
parents | 68a7dd38c03c |
children |
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 } | |
172
68a7dd38c03c
[svn r188] Fixed using a dereferenced pointer argument as both l- and r-value. fixes tango.io.FileRoots.
lindquist
parents:
132
diff
changeset
|
30 |
68a7dd38c03c
[svn r188] Fixed using a dereferenced pointer argument as both l- and r-value. fixes tango.io.FileRoots.
lindquist
parents:
132
diff
changeset
|
31 void main() |
68a7dd38c03c
[svn r188] Fixed using a dereferenced pointer argument as both l- and r-value. fixes tango.io.FileRoots.
lindquist
parents:
132
diff
changeset
|
32 { |
68a7dd38c03c
[svn r188] Fixed using a dereferenced pointer argument as both l- and r-value. fixes tango.io.FileRoots.
lindquist
parents:
132
diff
changeset
|
33 func(); |
68a7dd38c03c
[svn r188] Fixed using a dereferenced pointer argument as both l- and r-value. fixes tango.io.FileRoots.
lindquist
parents:
132
diff
changeset
|
34 } |