Skip to content

Commit f8b24a5

Browse files
Add cocs
1 parent b99876e commit f8b24a5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Features/CSharp/Portable/InlineHints/CSharpInlineTypeHintsService.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ internal sealed class CSharpInlineTypeHintsService() : AbstractInlineTypeHintsSe
114114
return null;
115115

116116
string GetTypeDisplayString(ITypeSymbol type)
117+
// ToMinimalDisplayString will produce the smallest name for this type that should compile at the specified
118+
// location in this tree. We want that over ToDisplayString as that will produce the most readable name,
119+
// which isn't necessarily something that will compile (for example, if needed namespaces are missing from
120+
// the name).
117121
=> type.ToMinimalDisplayString(semanticModel, node.SpanStart, s_minimalTypeStyle);
118122

119123
TypeHint CreateTypeHint(

0 commit comments

Comments
 (0)