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
14 changes: 5 additions & 9 deletions compiler/noirc_evaluator/src/acir/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -806,17 +806,13 @@ impl<'a> Context<'a> {
let outputs = self
.convert_ssa_intrinsic_call(*intrinsic, arguments, dfg, result_ids)?;

// Issue #1438 causes this check to fail with intrinsics that return 0
// results but the ssa form instead creates 1 unit result value.
// assert_eq!(result_ids.len(), outputs.len());
assert_eq!(result_ids.len(), outputs.len());
self.handle_ssa_call_outputs(result_ids, outputs, dfg)?;
}
Value::ForeignFunction(_) => {
// TODO: Remove this once elaborator is default frontend. This is now caught by a lint inside the frontend.
return Err(RuntimeError::UnconstrainedOracleReturnToConstrained {
call_stack: self.acir_context.get_call_stack(),
});
}
Value::ForeignFunction(_) => unreachable!(
"Frontend should remove any oracle calls from constrained functions"
),

_ => unreachable!("expected calling a function but got {function_value:?}"),
}
}
Expand Down
3 changes: 0 additions & 3 deletions compiler/noirc_evaluator/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ pub enum RuntimeError {
BigIntModulus { call_stack: CallStack },
#[error("Slices cannot be returned from an unconstrained runtime to a constrained runtime")]
UnconstrainedSliceReturnToConstrained { call_stack: CallStack },
#[error("All `oracle` methods should be wrapped in an unconstrained fn")]
UnconstrainedOracleReturnToConstrained { call_stack: CallStack },
#[error(
"Could not resolve some references to the array. All references must be resolved at compile time"
)]
Expand Down Expand Up @@ -200,7 +198,6 @@ impl RuntimeError {
| RuntimeError::NestedSlice { call_stack, .. }
| RuntimeError::BigIntModulus { call_stack, .. }
| RuntimeError::UnconstrainedSliceReturnToConstrained { call_stack }
| RuntimeError::UnconstrainedOracleReturnToConstrained { call_stack }
| RuntimeError::ReturnedReferenceFromDynamicIf { call_stack }
| RuntimeError::ReturnedFunctionFromDynamicIf { call_stack }
| RuntimeError::BreakOrContinue { call_stack }
Expand Down
Loading