Mercurial > projects > ldc
annotate tests/mini/interface7.d @ 583:12bda38ea366
Fixed choosing default target machine without needing to link in targets.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Sun, 07 Sep 2008 17:44:25 -0700 |
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 } |