Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
JohanLarsson committed Sep 11, 2023
1 parent 4cc1838 commit 5e1b870
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 @@ -270,7 +270,7 @@ public static ExecutedBefore IsExecutedBefore(this StatementSyntax statement, St
return ExecutedBefore.No;
}

if (statement.TryFirstAncestor(out CatchClauseSyntax _))
if (statement.TryFirstAncestor<CatchClauseSyntax>(out _))
{
return statement.SpanStart < other.SpanStart ? ExecutedBefore.Maybe : ExecutedBefore.No;
}
Expand Down Expand Up @@ -411,7 +411,7 @@ public static ExecutedBefore IsExecutedBefore(this ExpressionSyntax node, Expres
return statement.IsExecutedBefore(otherStatement);
}

if (node.TryFindSharedAncestorRecursive(other, out BinaryExpressionSyntax _))
if (node.TryFindSharedAncestorRecursive<BinaryExpressionSyntax>(other, out _))
{
return node.SpanStart < other.SpanStart ? ExecutedBefore.Yes : ExecutedBefore.No;
}
Expand Down

0 comments on commit 5e1b870

Please sign in to comment.