Skip to content

Commit

Permalink
disable return constant error
Browse files Browse the repository at this point in the history
  • Loading branch information
kevaundray committed Oct 12, 2023
1 parent 0fc8f20 commit a302b7a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions compiler/noirc_evaluator/src/ssa/acir_gen/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1259,9 +1259,12 @@ impl Context {
// will expand the array if there is one.
let return_acir_vars = self.flatten_value_list(return_values, dfg);
for acir_var in return_acir_vars {
if self.acir_context.is_constant(&acir_var) {
return Err(InternalError::ReturnConstant { call_stack: call_stack.clone() });
}
// TODO(Guillaume) -- disabled as it has shown to break
// TODO with important programs. We will add it back once
// TODO we change it to a warning.
// if self.acir_context.is_constant(&acir_var) {
// return Err(InternalError::ReturnConstant { call_stack: call_stack.clone() });
// }
self.acir_context.return_var(acir_var)?;
}
Ok(())
Expand Down

0 comments on commit a302b7a

Please sign in to comment.