Mercurial > projects > ldc
annotate tests/mini/classes9.d @ 920:545f54041d91
Implemented proper support for naked asm using llvm module level asm. Still not 100% complete, but already 1000 times better that what we had before. Don's BignumX86 implementation from Tango (when turned into a standalone unittest) seems to fully work with no changes, and great performance :)
Fixed align N; in asm blocks.
Fixed inreg parameter passing on x86 for ref/out params.
Removed support for lazy initialization of function local static variables, I have no idea why I ever implemented this, it's not in the D spec, and DMD doesn't support it :P
Some of the global variable related changes might cause minor regressions, but they should be easily fixable.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Tue, 03 Feb 2009 08:54:57 +0100 |
parents | 1bb99290e03a |
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 } |