aboutsummaryrefslogtreecommitdiffstats
path: root/progs/tests/func/calls_inside_calls.sy
diff options
context:
space:
mode:
Diffstat (limited to 'progs/tests/func/calls_inside_calls.sy')
-rw-r--r--progs/tests/func/calls_inside_calls.sy11
1 files changed, 11 insertions, 0 deletions
diff --git a/progs/tests/func/calls_inside_calls.sy b/progs/tests/func/calls_inside_calls.sy
new file mode 100644
index 0000000..5f6716b
--- /dev/null
+++ b/progs/tests/func/calls_inside_calls.sy
@@ -0,0 +1,11 @@
+start :: fn {
+ one := fn -> int {
+ ret 1
+ }
+ add := fn a: int, b: int -> int {
+ ret a + b
+ }
+ add(one(), one()) <=> 2
+ add(add(one(), one()), one()) <=> 3
+ add(one(), add(one(), one())) <=> 3
+}