Mercurial > projects > ldc
annotate tests/mini/interface7.d @ 912:16264a3973bf
_d_delarray also had one of the array consistency asserts mentioned in #184
and dmd2632.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Fri, 30 Jan 2009 07:51:50 +0100 |
parents | 1bb99290e03a |
children |
rev | line source |
---|---|
114 | 1 module interface7; |
2 | |
133
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
114
diff
changeset
|
3 extern(C) int printf(char*,...); |
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
114
diff
changeset
|
4 |
114 | 5 interface I |
6 { | |
7 } | |
8 | |
9 class C : I | |
10 { | |
11 } | |
12 | |
13 void main() | |
14 { | |
15 I i = new C; | |
16 ClassInfo ci = i.classinfo; | |
17 char[] name = ci.name; | |
18 printf("ci.name = %.*s\n", name.length, name.ptr); | |
19 ClassInfo cI = I.classinfo; | |
20 name = cI.name; | |
21 printf("cI.name = %.*s\n", name.length, name.ptr); | |
22 assert(ci is cI); | |
23 } |