From 2a65aa2bd555630de1d94a0432aed89024333abe Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Thu, 20 Nov 2025 02:23:47 -0800 Subject: [PATCH] fix DynShr[SU]'s literal bits to properly shift right instead of left --- crates/fayalite/src/expr/ops.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/fayalite/src/expr/ops.rs b/crates/fayalite/src/expr/ops.rs index b10e3ae8..4b7902e7 100644 --- a/crates/fayalite/src/expr/ops.rs +++ b/crates/fayalite/src/expr/ops.rs @@ -1272,7 +1272,7 @@ macro_rules! impl_dyn_shr { literal_bits: Err(NotALiteralExpr), }; retval.literal_bits = binary_op_literal_bits(retval.ty(), lhs, rhs, |lhs, rhs| { - Ok(lhs << rhs.to_usize().ok_or(NotALiteralExpr)?) + Ok(lhs >> rhs.to_usize().ok_or(NotALiteralExpr)?) }); retval }