This commit is contained in:
Scarlett
2025-04-02 11:54:13 -04:00
parent 53a4d060b6
commit d05b6f456c
2 changed files with 27 additions and 0 deletions

View File

@ -1,6 +1,7 @@
type rec: [integer: x; integer: y]
type T1: integer -> integer
type T2: rec -> integer
type arr : 1 -> integer
function foo : T1
function bar1 : T2
@ -23,5 +24,6 @@ entry(arg) := {
w.y := 7;
result := bar1(w); (* pass w (a rec type value) to bar1 *)
result := bar2(5,7); (* implicitly build a rec type value, assign 5 and 7 to fields x and y, but call them r and s *)
arr(3);
return 0;
}