2024-05-12 05:16:40 -05:00
|
|
|
Ty := struct {
|
2024-05-12 07:56:59 -05:00
|
|
|
a: int,
|
|
|
|
b: int,
|
2024-05-12 05:16:40 -05:00
|
|
|
}
|
|
|
|
|
2024-05-12 13:10:50 -05:00
|
|
|
Ty2 := struct {
|
|
|
|
ty: Ty,
|
|
|
|
c: int,
|
|
|
|
}
|
|
|
|
|
2024-05-12 05:16:40 -05:00
|
|
|
main := fn(): int {
|
2024-05-12 13:10:50 -05:00
|
|
|
inst := Ty2.{ ty: Ty.{ a: 4, b: 1 }, c: 3 };
|
|
|
|
if inst.c == 3 {
|
|
|
|
return pass(inst.ty);
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
pass := fn(t: Ty): int {
|
|
|
|
return t.a - t.b;
|
2024-05-12 05:16:40 -05:00
|
|
|
}
|