mirror of
https://github.com/github/codeql.git
synced 2026-05-05 05:35:13 +02:00
C#: Fix nullability warnings after .net 5 upgrade
This commit is contained in:
@@ -86,7 +86,7 @@ namespace Semmle.Extraction.CSharp.Entities
|
||||
}
|
||||
}
|
||||
|
||||
private ConstructorDeclarationSyntax Syntax
|
||||
private ConstructorDeclarationSyntax? Syntax
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -122,7 +122,7 @@ namespace Semmle.Extraction.CSharp.Entities
|
||||
trapFile.Write(";constructor");
|
||||
}
|
||||
|
||||
private ConstructorDeclarationSyntax GetSyntax() =>
|
||||
private ConstructorDeclarationSyntax? GetSyntax() =>
|
||||
Symbol.DeclaringSyntaxReferences.Select(r => r.GetSyntax()).OfType<ConstructorDeclarationSyntax>().FirstOrDefault();
|
||||
|
||||
public override Microsoft.CodeAnalysis.Location? FullLocation => ReportingLocation;
|
||||
|
||||
Reference in New Issue
Block a user