diff --git a/examples/or_bitwise.reid b/examples/or_bitwise.reid index 731892b..e7b7487 100644 --- a/examples/or_bitwise.reid +++ b/examples/or_bitwise.reid @@ -2,9 +2,9 @@ fn main() -> bool { - let bwand = (0xff & 0xf0) >> 4; - let bwor = (0x0f | 0x00) << 4; - let bwxor = (0xf0 | 0x0f); + let bwand = (0xffu32 & 0xf0) >> 4; + let bwor = (0x0fu32 | 0x00) << 4; + let bwxor = (0xf0u32 | 0x0f); return (bwxor == 255) && ((bwand == 15) || false) && (bwor == 240); } \ No newline at end of file diff --git a/reid/src/mir/typecheck/typecheck.rs b/reid/src/mir/typecheck/typecheck.rs index 1589cf7..59afd4a 100644 --- a/reid/src/mir/typecheck/typecheck.rs +++ b/reid/src/mir/typecheck/typecheck.rs @@ -431,6 +431,7 @@ impl Expression { params: (lhs_type.clone(), rhs_type.clone()), operator: *op, }); + dbg!(&binops, &expected_return_ty); if let Some(binop) = binops .iter() .filter(|f| f.1.return_ty.narrow_into(&expected_return_ty).is_ok())