diff options
| author | Gustav Sörnäs <gustav@sornas.net> | 2021-01-15 13:59:27 +0100 |
|---|---|---|
| committer | Gustav Sörnäs <gustav@sornas.net> | 2021-01-15 16:58:08 +0100 |
| commit | e85c4984dbca6cb1bf579accf7d0ad694e619eb8 (patch) | |
| tree | e0c07242fedb174bd24bc44fd9c217aabba2eb0a /tests/simple.tdy | |
| parent | a3ccc100e0dbc99ace7507694e4934bec2458d6e (diff) | |
| download | sylt-e85c4984dbca6cb1bf579accf7d0ad694e619eb8.tar.gz | |
parse function types in function types in...
Diffstat (limited to 'tests/simple.tdy')
| -rw-r--r-- | tests/simple.tdy | 30 |
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 +// }) |
