Files
ldc/test/interface4.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

36 lines
404 B
D

module interface4;
extern(C) int printf(char*,...);
interface I
{
void func();
}
interface I2
{
void func();
}
class C : I,I2
{
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();
I2 i2 = c;
i2.func();
printf("final %d\n", c.i);
assert(c.i == 45);
}