aboutsummaryrefslogtreecommitdiffstats
path: root/src/vm.rs
diff options
context:
space:
mode:
authorEdvard Thörnros <edvard.thornros@gmail.com>2021-02-16 23:45:45 +0100
committerEdvard Thörnros <edvard.thornros@gmail.com>2021-02-16 23:45:45 +0100
commit742c16dccef17a57494fe5846818cfc3324bbd45 (patch)
tree7a8286e1935a77c16b958a6cb8b6e34071497270 /src/vm.rs
parenta668f98f725f27a9e9cdc40b75cc0f99b8f998a6 (diff)
downloadsylt-742c16dccef17a57494fe5846818cfc3324bbd45.tar.gz
add tests for unusued variables
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 f5c1cf0..70cb5e4 100644
--- a/src/vm.rs
+++ b/src/vm.rs
@@ -831,15 +831,18 @@ mod tests {
test_string!(uncallable_type, "
f := fn i: int {
i()
- }",
+ }
+ f",
[ErrorKind::TypeError(_, _)]);
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(_, _)]);
}
}