Fix bitwise shift functions type error in the second argument
@@ -676,6 +676,10 @@ pub(crate) fn shr(&self, n1: Number, n2: Number) -> Result<Number, MachineStub>
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 @@ pub(crate) fn shl(&self, n1: Number, n2: Number) -> Result<Number, MachineStub>
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,
