From ef9b22289b10ccd1b3aec6150c3a9749bc0f9079 Mon Sep 17 00:00:00 2001 From: Ary Borenszweig Date: Tue, 23 Jul 2024 13:24:20 -0300 Subject: [PATCH] Add a regression test for bit not on untyped integer --- compiler/noirc_frontend/src/tests.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/compiler/noirc_frontend/src/tests.rs b/compiler/noirc_frontend/src/tests.rs index 3767dad103c..7971463c071 100644 --- a/compiler/noirc_frontend/src/tests.rs +++ b/compiler/noirc_frontend/src/tests.rs @@ -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); +}