Mercurial > projects > ldc
comparison tests/mini/classinfo4.d @ 341:1bb99290e03a trunk
[svn r362] Started merging the old 'test' dir as well as the newer 'tangotests' dir into 'tests/mini' and 'tests/minicomplex'.
author | lindquist |
---|---|
date | Sun, 13 Jul 2008 02:51:19 +0200 |
parents | test/classinfo4.d@368547b1cbe6 |
children |
comparison
equal
deleted
inserted
replaced
340:351c0077d0b3 | 341:1bb99290e03a |
---|---|
1 module classinfo4; | |
2 | |
3 class C | |
4 { | |
5 } | |
6 | |
7 class D : C | |
8 { | |
9 this() | |
10 { | |
11 } | |
12 ~this() | |
13 { | |
14 } | |
15 } | |
16 | |
17 template T() | |
18 { | |
19 ~this() | |
20 { | |
21 } | |
22 } | |
23 | |
24 class E : D | |
25 { | |
26 this() | |
27 { | |
28 } | |
29 ~this() | |
30 { | |
31 } | |
32 mixin T; | |
33 } | |
34 | |
35 void main() | |
36 { | |
37 assert(C.classinfo.defaultConstructor is null); | |
38 assert(C.classinfo.destructor is null); | |
39 assert(D.classinfo.defaultConstructor !is null); | |
40 assert(D.classinfo.destructor !is null); | |
41 assert(E.classinfo.defaultConstructor !is null); | |
42 assert(E.classinfo.destructor !is null); | |
43 } |