aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEdvard Thörnros <edvard.thornros@gmail.com>2021-02-17 22:24:53 +0100
committerEdvard Thörnros <edvard.thornros@gmail.com>2021-02-19 18:02:45 +0100
commit67e9dc6cdc05b340821fc8669eaaff0797356466 (patch)
treeac08a9307f2661fcc20293715a118968667ee51e /src
parent54f82c4f415be770063a3315ebbb66e5b61c46a1 (diff)
downloadsylt-67e9dc6cdc05b340821fc8669eaaff0797356466.tar.gz
fix test errors
Diffstat (limited to 'src')
-rw-r--r--src/vm.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vm.rs b/src/vm.rs
index fca2757..6e52fc3 100644
--- a/src/vm.rs
+++ b/src/vm.rs
@@ -811,20 +811,20 @@ impl VM {
mod tests {
mod typing {
use crate::error::ErrorKind;
- use crate::test_string;
+ use crate::{test_string, Op, Type};
test_string!(uncallable_type, "
f := fn i: int {
i()
}",
- [ErrorKind::TypeError(_, _)]);
+ [ErrorKind::ValueError(Op::Call(0), _)]);
test_string!(wrong_params, "
f : fn -> int = fn a: int -> int {}",
- [ErrorKind::TypeError(_, _), ErrorKind::TypeError(_, _)]);
+ [ErrorKind::TypeMismatch(_, _), ErrorKind::TypeMismatch(Type::Void, Type::Int)]);
test_string!(wrong_ret, "
f : fn -> int = fn {}",
- [ErrorKind::TypeError(_, _)]);
+ [ErrorKind::TypeMismatch(_, _)]);
}
}