diff --git a/.config/nextest.toml b/.config/nextest.toml index f3fe1b2db0f..8021e93e1bd 100644 --- a/.config/nextest.toml +++ b/.config/nextest.toml @@ -7,4 +7,4 @@ fail-fast = false fail-fast = true # Disable fuzzing to avoid flakiness -default-filter = "not package(noir_ast_fuzzer_fuzz)" +default-filter = "not (package(noir_ast_fuzzer_fuzz) or test(arb_program_freqs_in_expected_range))" diff --git a/test_programs/compile_success_no_bug/regression_8727/Nargo.toml b/test_programs/compile_success_no_bug/regression_8727/Nargo.toml new file mode 100644 index 00000000000..54751bff774 --- /dev/null +++ b/test_programs/compile_success_no_bug/regression_8727/Nargo.toml @@ -0,0 +1,6 @@ +[package] +name = "regression_8727" +type = "bin" +authors = [""] + +[dependencies] diff --git a/test_programs/compile_success_no_bug/regression_8727/src/main.nr b/test_programs/compile_success_no_bug/regression_8727/src/main.nr new file mode 100644 index 00000000000..93fd96f9126 --- /dev/null +++ b/test_programs/compile_success_no_bug/regression_8727/src/main.nr @@ -0,0 +1,8 @@ +global G_A: (str<2>, [str<2>; 2], [bool; 0]) = ("IU", ["TC", "JC"], []); +unconstrained fn main() -> pub str<2> { + (*func_2(G_A)[0]) +} +unconstrained fn func_2(mut b: (str<2>, [str<2>; 2], [bool; 0])) -> [&mut str<2>; 1] { + let _c: [str<2>; 1] = [b.0]; + [(&mut b.0)] +} diff --git a/tooling/nargo_cli/tests/snapshots/compile_success_no_bug/regression_8727/execute__tests__expanded.snap b/tooling/nargo_cli/tests/snapshots/compile_success_no_bug/regression_8727/execute__tests__expanded.snap new file mode 100644 index 00000000000..8d811e36e22 --- /dev/null +++ b/tooling/nargo_cli/tests/snapshots/compile_success_no_bug/regression_8727/execute__tests__expanded.snap @@ -0,0 +1,14 @@ +--- +source: tooling/nargo_cli/tests/execute.rs +expression: expanded_code +--- +global G_A: (str<2>, [str<2>; 2], [bool; 0]) = ("IU", ["TC", "JC"], []); + +unconstrained fn main() -> pub str<2> { + *func_2(G_A)[0] +} + +unconstrained fn func_2(mut b: (str<2>, [str<2>; 2], [bool; 0])) -> [&mut str<2>; 1] { + let _c: [str<2>; 1] = [b.0]; + [&mut b.0] +}