mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-03-01 10:03:30 +01:00
[svn r362] Started merging the old 'test' dir as well as the newer 'tangotests' dir into 'tests/mini' and 'tests/minicomplex'.
This commit is contained in:
24
tests/mini/interface1.d
Normal file
24
tests/mini/interface1.d
Normal file
@@ -0,0 +1,24 @@
|
||||
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();
|
||||
}
|
||||
Reference in New Issue
Block a user