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

23 lines
239 B
D

module interface1;
interface Inter
{
void func();
}
class Class : Inter
{
override void func()
{
printf("hello world\n");
}
}
void main()
{
scope c = new Class;
c.func();
Inter i = c;
i.func();
}