Skip to content

Commit a3f31c6

Browse files
YVbakkereNeRGy164
authored andcommitted
Have GetTypeDisplayString return nullable string
1 parent 7086a38 commit a3f31c6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/DendroDocs.Tool/Extensions/SemanticModelExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ namespace DendroDocs.Tool;
22

33
public static class SemanticModelExtensions
44
{
5-
public static string GetTypeDisplayString(this SemanticModel semanticModel, SyntaxNode node)
5+
public static string? GetTypeDisplayString(this SemanticModel semanticModel, SyntaxNode node)
66
{
7-
return semanticModel.GetTypeInfo(node).Type.ToDisplayString();
7+
return semanticModel.GetTypeInfo(node).Type?.ToDisplayString();
88
}
99

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

0 commit comments

Comments
 (0)