|
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;
|
|
}
|
|
}
|