Skip to content

Commit dc4481b

Browse files
committed
Use SymbolEqualityComparer
1 parent 6ecf3b7 commit dc4481b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Common/CSharp/Analysis/AddExceptionToDocumentationComment/AddExceptionToDocumentationCommentAnalysis.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ private static bool IsExceptionTypeCaughtInMethod(SyntaxNode node, ITypeSymbol e
228228
SyntaxNode parent = node.Parent;
229229
while (parent is not null)
230230
{
231-
if (parent is TryStatementSyntax tryStatement && tryStatement.Catches.Any(catchClause => exceptionSymbol == semanticModel.GetTypeSymbol(catchClause.Declaration?.Type, cancellationToken)))
231+
if (parent is TryStatementSyntax tryStatement && tryStatement.Catches.Any(catchClause => SymbolEqualityComparer.Default.Equals(exceptionSymbol, semanticModel.GetTypeSymbol(catchClause.Declaration?.Type, cancellationToken))))
232232
{
233233
return true;
234234
}

0 commit comments

Comments
 (0)