Files
ldc/test/interface3.d
Tomas Lindquist Olsen 4505b9b006 [svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
In particular, assertions has been fixed to include file/line info, and much more!
2008-01-14 05:11:54 +01:00

31 lines
364 B
D

module interface3;
extern(C) int printf(char*,...);
interface I
{
void func();
}
class C : I
{
int i = 42;
override void func()
{
printf("hello %d\n", i);
i++;
}
}
void main()
{
scope c = new C;
{c.func();}
{
I i = c;
{i.func();}
}
{printf("final %d\n", c.i);}
{assert(c.i == 44);}
}