view test/interface1.d @ 166:a2c4dc388d5e trunk

[svn r182] Oups, the PGM output for the raytracer demo was borked.
author lindquist
date Tue, 06 May 2008 00:03:55 +0200
parents 44a95ac7368a
children
line wrap: on
line source

module interface1;

extern(C) int printf(char*,...);

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();
}