Merge pull request #938 from pmoura/fix_bitwise_shift_functions_type_error_in_second_argument

Fix bitwise shift functions type error in the second argument
This commit is contained in:
Mark Thom
2021-05-10 11:10:20 -06:00
committed by GitHub

View File

@@ -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,