mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-09-30 17:19:24 +02:00
In particular, assertions has been fixed to include file/line info, and much more!
32 lines
391 B
D
32 lines
391 B
D
interface Inter
|
|
{
|
|
int func();
|
|
}
|
|
|
|
extern(C) int printf(char*, ...);
|
|
|
|
class InterClass : Inter
|
|
{
|
|
int func()
|
|
{
|
|
return printf("InterClass.func()\n");
|
|
}
|
|
}
|
|
|
|
alias int delegate() dg_t;
|
|
|
|
void main()
|
|
{
|
|
scope c = new InterClass;
|
|
|
|
{
|
|
Inter i = cast(Inter)c;
|
|
{
|
|
dg_t dg = &i.func;
|
|
{
|
|
int j = dg();
|
|
}
|
|
}
|
|
}
|
|
}
|