Fix bitwise shift functions type error in the second argument

This commit is contained in:
Paulo Moura
2021-05-09 19:58:35 +01:00
parent 9b483d381f
commit 7a576ee36e

View File

@@ -676,6 +676,10 @@ impl MachineState {
MachineError::type_error(self.heap.h(), ValidType::Integer, n2), MachineError::type_error(self.heap.h(), ValidType::Integer, n2),
stub, stub,
)), )),
(Number::Fixnum(_), n2) => Err(self.error_form(
MachineError::type_error(self.heap.h(), ValidType::Integer, n2),
stub,
)),
(n1, _) => Err(self.error_form( (n1, _) => Err(self.error_form(
MachineError::type_error(self.heap.h(), ValidType::Integer, n1), MachineError::type_error(self.heap.h(), ValidType::Integer, n1),
stub, stub,
@@ -716,6 +720,10 @@ impl MachineState {
MachineError::type_error(self.heap.h(), ValidType::Integer, n2), MachineError::type_error(self.heap.h(), ValidType::Integer, n2),
stub, stub,
)), )),
(Number::Fixnum(_), n2) => Err(self.error_form(
MachineError::type_error(self.heap.h(), ValidType::Integer, n2),
stub,
)),
(n1, _) => Err(self.error_form( (n1, _) => Err(self.error_form(
MachineError::type_error(self.heap.h(), ValidType::Integer, n1), MachineError::type_error(self.heap.h(), ValidType::Integer, n1),
stub, stub,