From f8b24a57d5b547a60d84101f76da5f90c3f2b688 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Thu, 19 Dec 2024 14:44:12 -0800 Subject: [PATCH] Add cocs --- .../Portable/InlineHints/CSharpInlineTypeHintsService.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Features/CSharp/Portable/InlineHints/CSharpInlineTypeHintsService.cs b/src/Features/CSharp/Portable/InlineHints/CSharpInlineTypeHintsService.cs index c48f6f406301..bf41eeb2ad2d 100644 --- a/src/Features/CSharp/Portable/InlineHints/CSharpInlineTypeHintsService.cs +++ b/src/Features/CSharp/Portable/InlineHints/CSharpInlineTypeHintsService.cs @@ -114,6 +114,10 @@ internal sealed class CSharpInlineTypeHintsService() : AbstractInlineTypeHintsSe return null; string GetTypeDisplayString(ITypeSymbol type) + // ToMinimalDisplayString will produce the smallest name for this type that should compile at the specified + // location in this tree. We want that over ToDisplayString as that will produce the most readable name, + // which isn't necessarily something that will compile (for example, if needed namespaces are missing from + // the name). => type.ToMinimalDisplayString(semanticModel, node.SpanStart, s_minimalTypeStyle); TypeHint CreateTypeHint(