diff --git a/test_programs/execution_failure/regression_9852/Nargo.toml b/test_programs/execution_failure/regression_9852/Nargo.toml new file mode 100644 index 00000000000..ba070211c98 --- /dev/null +++ b/test_programs/execution_failure/regression_9852/Nargo.toml @@ -0,0 +1,6 @@ +[package] +name = "regression_9852" +type = "bin" +authors = [""] + +[dependencies] \ No newline at end of file diff --git a/test_programs/execution_failure/regression_9852/src/main.nr b/test_programs/execution_failure/regression_9852/src/main.nr new file mode 100644 index 00000000000..269bcbee30a --- /dev/null +++ b/test_programs/execution_failure/regression_9852/src/main.nr @@ -0,0 +1,10 @@ +// https://github.com/noir-lang/noir/issues/9852 +fn main() -> pub (bool, bool) { + let b: [(bool, bool); 2] = [(false, false), (false, true)]; + let c = if b[4098222575_u32].1 { + b + } else { + [(false, false), (true, true)] + }; + c[0] +} \ No newline at end of file