Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// The features being tested is using assert on brillig that is triggered through nested ACIR calls.
// We want to make sure we get a call stack from the original call in main to the failed assert.
fn main(x: Field) {
assert(1 == fold_conditional_wrapper(!x as bool));
assert(1 == fold_conditional_wrapper(x as bool));
}

Expand Down
4 changes: 4 additions & 0 deletions tooling/nargo/src/ops/execute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,10 @@ impl<'a, F: AcirField, B: BlackBoxFunctionSolver<F>, E: ForeignCallExecutor<F>>
}
}
}
// Clear the call stack if we have succeeded in executing the circuit.
// This needs to be done or else all successful ACIR call stacks will also be
// included in a failure case.
self.call_stack.clear();

Ok(acvm.finalize())
}
Expand Down