mirror of
https://github.com/github/codeql.git
synced 2026-05-03 12:45:27 +02:00
Fix method name resolution issue with nullable suppression
This commit is contained in:
@@ -13,6 +13,13 @@ namespace Semmle.Extraction.CSharp.Entities.Expressions
|
||||
|
||||
var target = symbolInfo.Symbol;
|
||||
|
||||
if (target == null &&
|
||||
symbolInfo.CandidateReason == CandidateReason.OverloadResolutionFailure &&
|
||||
info.Node.Parent.IsKind(SyntaxKind.SuppressNullableWarningExpression))
|
||||
{
|
||||
target = symbolInfo.CandidateSymbols.FirstOrDefault();
|
||||
}
|
||||
|
||||
if (target == null && symbolInfo.CandidateReason == CandidateReason.OverloadResolutionFailure)
|
||||
{
|
||||
// The expression is probably a cast
|
||||
|
||||
Reference in New Issue
Block a user