Mercurial > projects > ldc
annotate test/interface7.d @ 114:5880c12dba83 trunk
[svn r118] Fixed dynamic casts.
Fixed a few interface bugs.
author | lindquist |
---|---|
date | Sun, 25 Nov 2007 00:19:13 +0100 |
parents | |
children | 44a95ac7368a |
rev | line source |
---|---|
114 | 1 module interface7; |
2 | |
3 interface I | |
4 { | |
5 } | |
6 | |
7 class C : I | |
8 { | |
9 } | |
10 | |
11 void main() | |
12 { | |
13 I i = new C; | |
14 ClassInfo ci = i.classinfo; | |
15 char[] name = ci.name; | |
16 printf("ci.name = %.*s\n", name.length, name.ptr); | |
17 ClassInfo cI = I.classinfo; | |
18 name = cI.name; | |
19 printf("cI.name = %.*s\n", name.length, name.ptr); | |
20 assert(ci is cI); | |
21 } |