wraith-lang/interface.w

31 lines
350 B
OpenEdge ABL
Raw Normal View History

2021-06-07 19:52:57 +00:00
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;
}
}