annotate tests/mini/interface1.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/interface1.d@44a95ac7368a
children
rev   line source
lindquist@113 1 module interface1;
lindquist@113 2
lindquist@133 3 extern(C) int printf(char*,...);
lindquist@133 4
lindquist@113 5 interface Inter
lindquist@113 6 {
lindquist@113 7 void func();
lindquist@113 8 }
lindquist@113 9
lindquist@113 10 class Class : Inter
lindquist@113 11 {
lindquist@113 12 override void func()
lindquist@113 13 {
lindquist@113 14 printf("hello world\n");
lindquist@113 15 }
lindquist@113 16 }
lindquist@113 17
lindquist@113 18 void main()
lindquist@113 19 {
lindquist@113 20 scope c = new Class;
lindquist@113 21 c.func();
lindquist@113 22 Inter i = c;
lindquist@113 23 i.func();
lindquist@113 24 }