mirror of
https://github.com/github/codeql.git
synced 2025-12-22 19:56:32 +01:00
C#: Update the extractor to use the BestOrDefault extension method to choose between multiple locations.
This commit is contained in:
@@ -379,7 +379,7 @@ namespace Semmle.Extraction
|
||||
{
|
||||
if (!(optionalSymbol is null))
|
||||
{
|
||||
ExtractionError(message, optionalSymbol.ToDisplayString(), CreateLocation(optionalSymbol.Locations.FirstOrDefault()));
|
||||
ExtractionError(message, optionalSymbol.ToDisplayString(), CreateLocation(optionalSymbol.Locations.BestOrDefault()));
|
||||
}
|
||||
else if (!(optionalEntity is null))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user