aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdvard Thörnros <edvard.thornros@gmail.com>2021-02-17 22:42:38 +0100
committerEdvard Thörnros <edvard.thornros@gmail.com>2021-02-19 18:02:45 +0100
commitab05add4c3fbe25c688e16af9d8a9849669b797e (patch)
tree3796f7834dea166d394f4a9d349ce5d4dec589eb
parenta00e2b3f034cc8739eaa983977f5b63948feec07 (diff)
downloadsylt-ab05add4c3fbe25c688e16af9d8a9849669b797e.tar.gz
make op errors into TypeError
-rw-r--r--src/vm.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vm.rs b/src/vm.rs
index 6e52fc3..8208551 100644
--- a/src/vm.rs
+++ b/src/vm.rs
@@ -26,7 +26,7 @@ macro_rules! one_op {
let b = $fun(&a);
if b.is_nil() {
$self.push(b);
- error!($self, ErrorKind::ValueError($op, vec![a]));
+ error!($self, ErrorKind::TypeError($op, vec![a.into()]));
}
$self.push(b);
};
@@ -38,7 +38,7 @@ macro_rules! two_op {
let c = $fun(&a, &b);
if c.is_nil() {
$self.push(c);
- error!($self, ErrorKind::ValueError($op, vec![a, b]));
+ error!($self, ErrorKind::TypeError($op, vec![a.into(), b.into()]));
}
$self.push(c);
};