Mercurial > projects > ldc
annotate test/classes5.d @ 250:fc9c1a0eabbd trunk
[svn r267] Fixed debug info for global variables.
Cleaned up the debug info code in general.
author | lindquist |
---|---|
date | Wed, 11 Jun 2008 20:53:26 +0200 |
parents | 5e69b77a5c51 |
children | d9d5d59873d8 |
rev | line source |
---|---|
6 | 1 module classes5; |
2 | |
3 struct S | |
4 { | |
5 long l; | |
6 } | |
7 | |
8 class C | |
9 { | |
10 C c; | |
11 S s; | |
12 } | |
13 | |
14 void main() | |
15 { | |
8
5e69b77a5c51
[svn r12] fixed accessing aggregate fields of aggregates
lindquist
parents:
6
diff
changeset
|
16 C c = new C; |
5e69b77a5c51
[svn r12] fixed accessing aggregate fields of aggregates
lindquist
parents:
6
diff
changeset
|
17 long* lp = void; |
5e69b77a5c51
[svn r12] fixed accessing aggregate fields of aggregates
lindquist
parents:
6
diff
changeset
|
18 {c.s.l = 64;} |
5e69b77a5c51
[svn r12] fixed accessing aggregate fields of aggregates
lindquist
parents:
6
diff
changeset
|
19 {assert(c.s.l == 64);} |
5e69b77a5c51
[svn r12] fixed accessing aggregate fields of aggregates
lindquist
parents:
6
diff
changeset
|
20 {lp = &c.s.l;} |
5e69b77a5c51
[svn r12] fixed accessing aggregate fields of aggregates
lindquist
parents:
6
diff
changeset
|
21 {assert(*lp == 64);} |
5e69b77a5c51
[svn r12] fixed accessing aggregate fields of aggregates
lindquist
parents:
6
diff
changeset
|
22 printf("classes5 success\n"); |
6 | 23 } |