diff --git a/toolchain/check/return.cpp b/toolchain/check/return.cpp index 2492278ab798..775584d52490 100644 --- a/toolchain/check/return.cpp +++ b/toolchain/check/return.cpp @@ -181,8 +181,7 @@ auto BuildReturnWithExpr(Context& context, SemIR::LocId loc_id, expr_id = SemIR::ErrorInst::InstId; break; } - auto call_params = context.inst_blocks().Get( - GetCurrentFunctionForReturn(context).call_params_id); + auto call_params = context.inst_blocks().Get(function.call_params_id); if (function.call_param_ranges.return_size() == 0) { out_param_id = SemIR::InstId::None; break;