annotate tests/mini/interface7.d @ 341:1bb99290e03a trunk

[svn r362] Started merging the old 'test' dir as well as the newer 'tangotests' dir into 'tests/mini' and 'tests/minicomplex'.
author lindquist
date Sun, 13 Jul 2008 02:51:19 +0200
parents test/interface7.d@44a95ac7368a
children
rev   line source
lindquist@114 1 module interface7;
lindquist@114 2
lindquist@133 3 extern(C) int printf(char*,...);
lindquist@133 4
lindquist@114 5 interface I
lindquist@114 6 {
lindquist@114 7 }
lindquist@114 8
lindquist@114 9 class C : I
lindquist@114 10 {
lindquist@114 11 }
lindquist@114 12
lindquist@114 13 void main()
lindquist@114 14 {
lindquist@114 15 I i = new C;
lindquist@114 16 ClassInfo ci = i.classinfo;
lindquist@114 17 char[] name = ci.name;
lindquist@114 18 printf("ci.name = %.*s\n", name.length, name.ptr);
lindquist@114 19 ClassInfo cI = I.classinfo;
lindquist@114 20 name = cI.name;
lindquist@114 21 printf("cI.name = %.*s\n", name.length, name.ptr);
lindquist@114 22 assert(ci is cI);
lindquist@114 23 }