diff options
| -rw-r--r-- | progs/tests/global_collision.sy | 11 | ||||
| -rw-r--r-- | progs/tests/global_constants_edgecase.sy | 11 |
2 files changed, 22 insertions, 0 deletions
diff --git a/progs/tests/global_collision.sy b/progs/tests/global_collision.sy new file mode 100644 index 0000000..8dba295 --- /dev/null +++ b/progs/tests/global_collision.sy @@ -0,0 +1,11 @@ +// TODO(ed): Pure functions +fac :: fn a: int -> int { + if a < 1 { ret 1 } + ret a * fac! a - 1 +} + +a :: fac! 4 + +start :: fn { + a <=> 24 +} diff --git a/progs/tests/global_constants_edgecase.sy b/progs/tests/global_constants_edgecase.sy new file mode 100644 index 0000000..8dba295 --- /dev/null +++ b/progs/tests/global_constants_edgecase.sy @@ -0,0 +1,11 @@ +// TODO(ed): Pure functions +fac :: fn a: int -> int { + if a < 1 { ret 1 } + ret a * fac! a - 1 +} + +a :: fac! 4 + +start :: fn { + a <=> 24 +} |
