From 7a576ee36e2f3189d51b59dc3bb0610dc111e79a Mon Sep 17 00:00:00 2001 From: Paulo Moura <> Date: Sun, 9 May 2021 19:58:35 +0100 Subject: [PATCH] Fix bitwise shift functions type error in the second argument --- src/machine/arithmetic_ops.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/machine/arithmetic_ops.rs b/src/machine/arithmetic_ops.rs index dc06fd5a..4e3f832a 100644 --- a/src/machine/arithmetic_ops.rs +++ b/src/machine/arithmetic_ops.rs @@ -676,6 +676,10 @@ impl MachineState { MachineError::type_error(self.heap.h(), ValidType::Integer, n2), stub, )), + (Number::Fixnum(_), n2) => Err(self.error_form( + MachineError::type_error(self.heap.h(), ValidType::Integer, n2), + stub, + )), (n1, _) => Err(self.error_form( MachineError::type_error(self.heap.h(), ValidType::Integer, n1), stub, @@ -716,6 +720,10 @@ impl MachineState { MachineError::type_error(self.heap.h(), ValidType::Integer, n2), stub, )), + (Number::Fixnum(_), n2) => Err(self.error_form( + MachineError::type_error(self.heap.h(), ValidType::Integer, n2), + stub, + )), (n1, _) => Err(self.error_form( MachineError::type_error(self.heap.h(), ValidType::Integer, n1), stub, -- 2.54.0