2021-05-23 23:58:59 +00:00
|
|
|
struct Foo {
|
2021-05-25 02:20:23 +00:00
|
|
|
static Func2<U>(u: U) : U {
|
|
|
|
return u;
|
|
|
|
}
|
|
|
|
|
2021-05-23 23:58:59 +00:00
|
|
|
static Func<T>(t: T): T {
|
2021-05-25 02:20:23 +00:00
|
|
|
foo: T = t;
|
|
|
|
return Func2(foo);
|
2021-05-23 23:58:59 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
struct Program {
|
|
|
|
static main(): int {
|
|
|
|
x: int = 4;
|
|
|
|
y: int = Foo.Func(x);
|
|
|
|
return x;
|
|
|
|
}
|
|
|
|
}
|