Skip to content

Commit

Permalink
Merge pull request dotnet#71037 from CyrusNajmabadi/simplifyCode
Browse files Browse the repository at this point in the history
Remove nullable suppression in GetSemanticModel
  • Loading branch information
CyrusNajmabadi authored Nov 30, 2023
2 parents b8dc316 + 675611e commit 611ef89
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ public bool TryGetSemanticModel([NotNullWhen(returnValue: true)] out SemanticMod
}

var syntaxTree = await this.GetRequiredSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);
var compilation = (await this.Project.GetCompilationAsync(cancellationToken).ConfigureAwait(false))!;
var compilation = await this.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);

var result = compilation.GetSemanticModel(syntaxTree);
Contract.ThrowIfNull(result);
Expand Down

0 comments on commit 611ef89

Please sign in to comment.