aboutsummaryrefslogtreecommitdiffstats
path: root/src/vm.rs
diff options
context:
space:
mode:
authorEdvard Thörnros <edvard.thornros@gmail.com>2021-02-18 19:51:30 +0100
committerEdvard Thörnros <edvard.thornros@gmail.com>2021-02-18 19:51:30 +0100
commit75b2027c7b545b9827607f17ea7444f67622999d (patch)
treed6cc2e077c96ce0cfb683c0e3e0c2ab3fe4b997c /src/vm.rs
parent090dd8c52e4ae60742fe8bad7b74e18bb808ba0d (diff)
parent6bb72c7bbe2bbb1b627809d4b52f44a77bdb4b33 (diff)
downloadsylt-75b2027c7b545b9827607f17ea7444f67622999d.tar.gz
Merge branch 'unusued-variables' into fix-constant-bug
Diffstat (limited to 'src/vm.rs')
-rw-r--r--src/vm.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/vm.rs b/src/vm.rs
index 5e7810d..8d8ec23 100644
--- a/src/vm.rs
+++ b/src/vm.rs
@@ -838,15 +838,18 @@ mod tests {
test_string!(uncallable_type, "
f := fn i: int {
i()
- }",
+ }
+ f",
[ErrorKind::InvalidProgram]);
test_string!(wrong_params, "
- f : fn -> int = fn a: int -> int {}",
+ f : fn -> int = fn a: int -> int {}
+ f",
[ErrorKind::TypeError(_, _), ErrorKind::TypeError(_, _)]);
test_string!(wrong_ret, "
- f : fn -> int = fn {}",
+ f : fn -> int = fn {}
+ f",
[ErrorKind::TypeError(_, _)]);
}
}