Mercurial > projects > ldc
annotate test/classes9.d @ 203:e881c9b1c738 trunk
[svn r219] Fixed: the tango/lib/gc/basic garbage collector now compiles and links into an executable (change in tango/lib/llvmdc-posix.mak), closes #5 .
Changed: removed the crappy realloc based dynamic memory runtime and started moving over to DMD style runtime support, part of moving to real GC.
Fixed: dynamic arrays now use GC runtime for allocating memory.
Fixed: new expression now use GC for allocating memory.
Changed: revamped the dynamic array support routines related to dynamic memory.
Fixed: assertions no longer create exsessive allocas.
Changed: misc. minor cleanups.
author | lindquist |
---|---|
date | Tue, 13 May 2008 14:42:09 +0200 |
parents | 5880c12dba83 |
children |
rev | line source |
---|---|
114 | 1 module classes9; |
2 | |
3 class C | |
4 { | |
5 } | |
6 | |
7 class D : C | |
8 { | |
9 } | |
10 | |
11 class E | |
12 { | |
13 } | |
14 | |
15 class F : E | |
16 { | |
17 } | |
18 | |
19 void main() | |
20 { | |
21 { | |
22 D d = new D; | |
23 { | |
24 C c = d; | |
25 assert(c !is null); | |
26 D d2 = cast(D)c; | |
27 assert(d2 !is null); | |
28 E e = cast(E)d; | |
29 assert(e is null); | |
30 F f = cast(F)d; | |
31 assert(f is null); | |
32 } | |
33 } | |
34 { | |
35 F f = new F; | |
36 { | |
37 E e = f; | |
38 assert(e !is null); | |
39 F f2 = cast(F)e; | |
40 assert(f2 !is null); | |
41 C c = cast(C)f; | |
42 assert(c is null); | |
43 D d2 = cast(D)f; | |
44 assert(d2 is null); | |
45 } | |
46 } | |
47 } |