From: Paulo Moura <> Date: Sun, 9 May 2021 18:58:35 +0000 (+0100) Subject: Fix bitwise shift functions type error in the second argument X-Git-Tag: v0.9.0~75^2 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=7a576ee36e2f3189d51b59dc3bb0610dc111e79a;p=scryer-prolog.git Fix bitwise shift functions type error in the second argument --- 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,