Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
JohanLarsson committed Sep 12, 2023
1 parent 1ce83c7 commit 4158df8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Gu.Roslyn.AnalyzerExtensions/Scope.cs
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,8 @@ public static ExecutedBefore IsExecutedBefore(this StatementSyntax statement, St
}

if (statement.Parent is BlockSyntax { Statements: { } statements } &&
(statements.TryFirstOfType(out ReturnStatementSyntax _) ||
statements.TryFirstOfType(out ThrowStatementSyntax _)))
(statements.TryFirstOfType<StatementSyntax, ReturnStatementSyntax>(out _) ||
statements.TryFirstOfType<StatementSyntax, ThrowStatementSyntax>(out _)))
{
return ExecutedBefore.No;
}
Expand Down

0 comments on commit 4158df8

Please sign in to comment.