mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-12 19:03:13 +01:00
25 lines
273 B
D
25 lines
273 B
D
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();
|
|
}
|