Mercurial > projects > ldc
annotate test/interface7.d @ 269:967178e31a13 trunk
[svn r290] Forgot to remove a #define in mem.c
author | lindquist |
---|---|
date | Sun, 15 Jun 2008 18:57:11 +0200 |
parents | 44a95ac7368a |
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 } |