comparison test/classinfo4.d @ 112:368547b1cbe6 trunk

[svn r116] Implemented the ClassInfo.destructor field.
author lindquist
date Thu, 22 Nov 2007 22:30:10 +0100
parents a7ae554ce4f4
children
comparison
equal deleted inserted replaced
111:a7ae554ce4f4 112:368547b1cbe6
2 2
3 class C 3 class C
4 { 4 {
5 } 5 }
6 6
7 class D 7 class D : C
8 { 8 {
9 this() 9 this()
10 { 10 {
11 } 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;
12 } 33 }
13 34
14 void main() 35 void main()
15 { 36 {
16 assert(C.classinfo.defaultConstructor is null); 37 assert(C.classinfo.defaultConstructor is null);
38 assert(C.classinfo.destructor is null);
17 assert(D.classinfo.defaultConstructor !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);
18 } 43 }