From e39ff44d87fbbd04bad6b28a7ce3a4c1147547cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Sun, 7 Mar 2021 23:16:38 +0100 Subject: skip indexing into tuples when type checking --- src/vm.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/vm.rs b/src/vm.rs index 7cfc8d3..6b69b3c 100644 --- a/src/vm.rs +++ b/src/vm.rs @@ -717,6 +717,14 @@ impl VM { }; } + Op::Index => { + // We don't have any information about the slot and the indexable might contain + // mixed types. + self.stack.pop().unwrap(); // indexable + self.stack.pop().unwrap(); // slot + self.stack.push(Value::Unknown); + } + Op::Call(num_args) => { let new_base = self.stack.len() - 1 - num_args; match self.stack[new_base].clone() { -- cgit v1.2.1