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 @@ -583,6 +583,11 @@ impl<'block> BrilligBlock<'block> {
1,
);
}

// `Intrinsic::AsWitness` is used to provide hints to acir-gen on optimal expression splitting.
// It is then useless in the brillig runtime and so we can ignore it
Value::Intrinsic(Intrinsic::AsWitness) => (),

_ => {
unreachable!("unsupported function call type {:?}", dfg[*func])
}
Expand Down
6 changes: 6 additions & 0 deletions test_programs/execution_success/as_witness/Nargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[package]
name = "as_witness"
type = "bin"
authors = [""]

[dependencies]
1 change: 1 addition & 0 deletions test_programs/execution_success/as_witness/Prover.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a = 42
5 changes: 5 additions & 0 deletions test_programs/execution_success/as_witness/src/main.nr
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// Simple example of checking where two arrays are different
fn main(a: Field) -> pub Field {
std::as_witness(a);
a
}