1
0
mirror of https://github.com/golang/go synced 2024-11-19 05:44:40 -07:00
go/internal/lsp/testdata/summary.txt.golden
Muir Manders 49797d04a8 internal/lsp/source: improve completion in type assertions
In cases like:

var foo *someType = bar.(some<>)

We will now complete "some" to "*someType". This involved two changes:

1. Properly detect expected type as *someType in above example. To do
   this I just removed *ast.TypeAssertExpr from
   breaksExpectedTypeInference() so we continue searching up the AST for
   the expected type.

2. If the given type name T doesn't match, also try *T. If *T does
   match, we mark the candidate as "makePointer=true" so we know to
   prepend the "*" when formatting the candidate.

Change-Id: I05859c68082a798141755b614673a1483d864e3e
Reviewed-on: https://go-review.googlesource.com/c/tools/+/212717
Run-TryBot: Muir Manders <muir@mnd.rs>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2020-01-16 01:06:23 +00:00

25 lines
517 B
Plaintext

-- summary --
CompletionsCount = 225
CompletionSnippetCount = 63
UnimportedCompletionsCount = 9
DeepCompletionsCount = 5
FuzzyCompletionsCount = 8
RankedCompletionsCount = 55
CaseSensitiveCompletionsCount = 4
DiagnosticsCount = 35
FoldingRangesCount = 2
FormatCount = 6
ImportCount = 7
SuggestedFixCount = 1
DefinitionsCount = 43
TypeDefinitionsCount = 2
HighlightsCount = 45
ReferencesCount = 7
RenamesCount = 22
PrepareRenamesCount = 8
SymbolsCount = 1
SignaturesCount = 22
LinksCount = 8
ImplementationsCount = 5