File tree Expand file tree Collapse file tree 2 files changed +5
-12
lines changed
compiler/noirc_evaluator/src Expand file tree Collapse file tree 2 files changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -806,17 +806,13 @@ impl<'a> Context<'a> {
806
806
let outputs = self
807
807
. convert_ssa_intrinsic_call ( * intrinsic, arguments, dfg, result_ids) ?;
808
808
809
- // Issue #1438 causes this check to fail with intrinsics that return 0
810
- // results but the ssa form instead creates 1 unit result value.
811
- // assert_eq!(result_ids.len(), outputs.len());
809
+ assert_eq ! ( result_ids. len( ) , outputs. len( ) ) ;
812
810
self . handle_ssa_call_outputs ( result_ids, outputs, dfg) ?;
813
811
}
814
- Value :: ForeignFunction ( _) => {
815
- // TODO: Remove this once elaborator is default frontend. This is now caught by a lint inside the frontend.
816
- return Err ( RuntimeError :: UnconstrainedOracleReturnToConstrained {
817
- call_stack : self . acir_context . get_call_stack ( ) ,
818
- } ) ;
819
- }
812
+ Value :: ForeignFunction ( _) => unreachable ! (
813
+ "Frontend should remove any oracle calls from constrained functions"
814
+ ) ,
815
+
820
816
_ => unreachable ! ( "expected calling a function but got {function_value:?}" ) ,
821
817
}
822
818
}
Original file line number Diff line number Diff line change @@ -64,8 +64,6 @@ pub enum RuntimeError {
64
64
BigIntModulus { call_stack : CallStack } ,
65
65
#[ error( "Slices cannot be returned from an unconstrained runtime to a constrained runtime" ) ]
66
66
UnconstrainedSliceReturnToConstrained { call_stack : CallStack } ,
67
- #[ error( "All `oracle` methods should be wrapped in an unconstrained fn" ) ]
68
- UnconstrainedOracleReturnToConstrained { call_stack : CallStack } ,
69
67
#[ error(
70
68
"Could not resolve some references to the array. All references must be resolved at compile time"
71
69
) ]
@@ -200,7 +198,6 @@ impl RuntimeError {
200
198
| RuntimeError :: NestedSlice { call_stack, .. }
201
199
| RuntimeError :: BigIntModulus { call_stack, .. }
202
200
| RuntimeError :: UnconstrainedSliceReturnToConstrained { call_stack }
203
- | RuntimeError :: UnconstrainedOracleReturnToConstrained { call_stack }
204
201
| RuntimeError :: ReturnedReferenceFromDynamicIf { call_stack }
205
202
| RuntimeError :: ReturnedFunctionFromDynamicIf { call_stack }
206
203
| RuntimeError :: BreakOrContinue { call_stack }
You can’t perform that action at this time.
0 commit comments