Mercurial > projects > ldc
annotate test/classes9.d @ 131:5825d48b27d1 trunk
[svn r135] * Merged DMD 1.025 *
* Fixed a minor linking order mishap *
* Added an command line option -annotate *
* Fixed some problems with running optimizations *
* Added std.stdio and dependencies to lphobos (still not 100% working, but compiles and links) *
* Fixed problems with passing aggregate types to variadic functions *
* Added initial code towards full GC support, currently based on malloc and friends, not all the runtime calls the GC yet for memory *
* Fixed problems with resolving nested function context pointers for some heavily nested cases *
* Redid function argument passing + other minor code cleanups, still lots to do on this end... *
author | lindquist |
---|---|
date | Fri, 04 Jan 2008 01:38:42 +0100 |
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 } |