Mercurial > projects > ldc
annotate test/classinfo3.d @ 275:665b81613475 trunk
[svn r296] Removed: the 'suite' dir, it never took off!
Fixed: foreach statement, key-type checks were buggy.
Fixed: setting LLVMDC versions on the command line is now an error.
Fixed: array compare runtime had incorrect param attrs on call.
Fixed: index expressions on dynamic array slices w/o storage was broken.
Fixed: scope classes had incorrect finalization in some cases.
Fixed: when outputting !ClassInfoS !OffsetTypeInfoS, static class members were trying to be included, crashing the compiler.
Fixed: calling LLVMDC with -inline but not any -O option caused assertion failure.
Changed: the runtime now uses a single interface to "get" to !TypeInfoS, part of eliminating duplicate !TypeInfo codegen.
author | lindquist |
---|---|
date | Thu, 19 Jun 2008 17:30:32 +0200 |
parents | e8da7856a260 |
children |
rev | line source |
---|---|
110 | 1 module classinfo3; |
2 | |
3 class C | |
4 { | |
5 int i; | |
6 float f; | |
7 long l; | |
8 int j; | |
9 } | |
10 | |
11 void main() | |
12 { | |
13 auto c = C.classinfo; | |
14 assert(c.offTi !is null); | |
15 assert(c.offTi.length == 4); | |
16 | |
17 size_t base = 2*size_t.sizeof; | |
18 | |
19 assert(c.offTi[0].offset == base); | |
20 assert(c.offTi[0].ti == typeid(int)); | |
21 assert(c.offTi[1].offset == base+4); | |
22 assert(c.offTi[1].ti == typeid(float)); | |
23 assert(c.offTi[2].offset == base+8); | |
24 assert(c.offTi[2].ti == typeid(long)); | |
25 assert(c.offTi[3].offset == base+16); | |
26 assert(c.offTi[3].ti == typeid(int)); | |
27 } |