Files
ldc/test/interface2.d
Tomas Lindquist Olsen b43f5729b0 [svn r117] Initial working implementation of interfaces.
Groundwork for all the different types of class/interface casts laid out.
2007-11-24 06:33:00 +01:00

36 lines
369 B
D

module interface2;
interface A
{
void a();
}
interface B
{
void b();
}
class C : A,B
{
int i = 0;
override void a()
{
printf("hello from C.a\n");
}
override void b()
{
printf("hello from C.b\n");
}
}
void main()
{
scope c = new C;
{c.a();
c.b();}
{A a = c;
a.a();}
{B b = c;
b.b();}
}