Skip to content

Commit 78af1c9

Browse files
committed
Fix failure to handle expression-bodied local functions
1 parent 4212365 commit 78af1c9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Features/CSharp/Portable/AssignOutParameters/AssignOutParametersAtStartCodeFixProvider.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ protected override void TryRegisterFix(CodeFixContext context, Document document
2525
return;
2626
}
2727

28+
if (location is LocalFunctionStatementSyntax { ExpressionBody: { } })
29+
{
30+
// This is an expression-bodied local function, which is also handled by the other code fix.
31+
return;
32+
}
33+
2834
if (location is StatementSyntax statement &&
2935
statement.Parent is BlockSyntax block &&
3036
block.Statements[0] == statement &&

0 commit comments

Comments
 (0)