support operations directly on SimValue, UIntValue, and SIntValue, and shared references to those #55

Merged
programmerjake merged 2 commits from programmerjake/fayalite:adding-sim-ops-traits into master 2025-11-24 08:22:49 +00:00
Showing only changes of commit 2a65aa2bd5 - Show all commits

View file

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