Skip to content

Commit

Permalink
Have GetTypeDisplayString return nullable string
Browse files Browse the repository at this point in the history
  • Loading branch information
YVbakker authored and eNeRGy164 committed Jan 29, 2025
1 parent 7086a38 commit a3f31c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/DendroDocs.Tool/Extensions/SemanticModelExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ namespace DendroDocs.Tool;

public static class SemanticModelExtensions
{
public static string GetTypeDisplayString(this SemanticModel semanticModel, SyntaxNode node)
public static string? GetTypeDisplayString(this SemanticModel semanticModel, SyntaxNode node)
{
return semanticModel.GetTypeInfo(node).Type.ToDisplayString();
return semanticModel.GetTypeInfo(node).Type?.ToDisplayString();
}

public static string GetTypeDisplayString(this SemanticModel semanticModel, ExpressionSyntax expression)
Expand Down

0 comments on commit a3f31c6

Please sign in to comment.