aboutsummaryrefslogtreecommitdiffstats
path: root/tests/simple.tdy
diff options
context:
space:
mode:
authorGustav Sörnäs <gustav@sornas.net>2021-01-15 13:59:27 +0100
committerGustav Sörnäs <gustav@sornas.net>2021-01-15 16:58:08 +0100
commite85c4984dbca6cb1bf579accf7d0ad694e619eb8 (patch)
treee0c07242fedb174bd24bc44fd9c217aabba2eb0a /tests/simple.tdy
parenta3ccc100e0dbc99ace7507694e4934bec2458d6e (diff)
downloadsylt-e85c4984dbca6cb1bf579accf7d0ad694e619eb8.tar.gz
parse function types in function types in...
Diffstat (limited to 'tests/simple.tdy')
-rw-r--r--tests/simple.tdy30
1 files changed, 18 insertions, 12 deletions
diff --git a/tests/simple.tdy b/tests/simple.tdy
index 6dde932..f7929f4 100644
--- a/tests/simple.tdy
+++ b/tests/simple.tdy
@@ -1,14 +1,20 @@
-// a := 1
-// a = 2 + 1
-// a = 3
-//
-// for i := 0, i < 10, i = i + 1 {
-// print i + 1
-// print i + 2
-// }
-
-f := fn b: int -> int {
- ret b + 1
+a : fn int, int -> int = fn b: int, c: int -> int {
+ ret b + c
}
-f(1)
+print a(1, 2) + 1
+
+b := fn c: fn int -> -> int {
+ c(2)
+ ret 1
+}
+
+c := fn a: int {
+ print a
+}
+
+b(c)
+
+// print b(fn a: int -> {
+// print a
+// })