Mercurial > projects > ldc
annotate test/classes5.d @ 100:5071469303d4 trunk
[svn r104] TONS OF FIXES.
Split up declaration, constant initializer gen and definition for globals, structs, classes and functions.
Improved ClassInfo support (not complete), not in vtable yet.
Fixed a bunch of forward reference problems.
Much more. Major commit! :)
author | lindquist |
---|---|
date | Fri, 16 Nov 2007 08:21:47 +0100 |
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 } |