Skip to content

Commit

Permalink
Add a regression test for bit not on untyped integer
Browse files Browse the repository at this point in the history
  • Loading branch information
asterite committed Jul 23, 2024
1 parent ff8ca91 commit ef9b222
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions compiler/noirc_frontend/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2485,3 +2485,13 @@ fn trait_impl_generics_count_mismatch() {
assert_eq!(*expected, 0);
assert_eq!(*found, 1);
}

#[test]
fn bit_not_on_untyped_integer() {
let src = r#"
fn main() {
let _: u32 = 3 & !1;
}
"#;
assert_no_errors(src);
}

0 comments on commit ef9b222

Please sign in to comment.