diff --git a/toolchain/parse/handle_lambda.cpp b/toolchain/parse/handle_lambda.cpp index 8f30f32b22a4..1f34a03e40f5 100644 --- a/toolchain/parse/handle_lambda.cpp +++ b/toolchain/parse/handle_lambda.cpp @@ -85,7 +85,7 @@ auto HandleLambdaAfterParams(Context& context) -> void { context.PushState(state, StateKind::LambdaBody); context.PushState(StateKind::FunctionReturnTypeFinish); context.ConsumeAndDiscard(); - context.PushStateForExpr(PrecedenceGroup::ForType()); + context.PushState(StateKind::ReturnTypeOrFormExpr); } else if (context.PositionIs(Lex::TokenKind::MinusGreaterQuestion)) { // Has return form. context.PushState(state, StateKind::LambdaBody); diff --git a/toolchain/parse/testdata/function/declaration.carbon b/toolchain/parse/testdata/function/declaration.carbon index db3f5a2b6db2..05d481127ec6 100644 --- a/toolchain/parse/testdata/function/declaration.carbon +++ b/toolchain/parse/testdata/function/declaration.carbon @@ -550,7 +550,7 @@ fn RefReturn() -> ref; // CHECK:STDOUT: │ ├─LetInitializer '=' // CHECK:STDOUT: │ │ ╭─LambdaIntroducer 'fn' // CHECK:STDOUT: │ │ │ ╭─UnsignedIntTypeLiteral 'u32' -// CHECK:STDOUT: │ │ │ ╭─PrefixOperatorRef 'ref' +// CHECK:STDOUT: │ │ │ ╭─RefPrimitiveForm 'ref' // CHECK:STDOUT: │ │ ├─ReturnType '->' // CHECK:STDOUT: │ │ ╭─LambdaDefinitionStart '=>' // CHECK:STDOUT: │ │ ├─IntLiteral '0'