wraith-lang/interface.w

31 lines
350 B
OpenEdge ABL

struct Ass
{
Fart(): void
{
Console.PrintLine("Poot!");
}
}
interface Farter
{
Fart(): void;
}
struct FartDispatcher
{
static Fart<T : Farter>(farter: T): void
{
farter.Fart();
}
}
struct Program {
static Main(): int {
ass: Ass;
FartDispatcher.Fart(ass);
return 0;
}
}