Help typechecker a little bit

This commit is contained in:
Sofia 2025-07-28 12:18:42 +03:00
parent a4e18af983
commit 97948d8c38
2 changed files with 4 additions and 3 deletions

View File

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

View File

@ -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())