wraith-lang/generic.w

19 lines
278 B
OpenEdge ABL
Raw Normal View History

struct Foo {
static Func2<U>(u: U) : U {
return u;
}
static Func<T>(t: T): T {
foo: T = t;
2021-06-01 19:56:56 +00:00
return Foo.Func2(foo);
}
}
struct Program {
2021-06-01 19:56:56 +00:00
static Main(): int {
x: int = 4;
y: int = Foo.Func(x);
return x;
}
2021-06-01 19:56:56 +00:00
}