mirror of
https://github.com/golang/go
synced 2024-11-19 00:44:40 -07:00
d31a08c2ed
We now understand what "kind" of type is expected when using various builtins. For example, when completing "close(<>)" we prefer channels, and when completing "delete(<>)" we prefer maps. I also added some code to infer the expected type for the second argument to "delete()" and for the args to "copy()": delete(map[someType]int{}, <>) // expect "someType" copy([]int{}, <>) // expect "[]int" copy(<>, []int{}) // expect "[]int" And I marked "new()" as expected a type name, and it infers the type name properly: var _ *int = new(<>) // expected type at "<>" is "int" Fixes golang/go#36326. Change-Id: I4295c8753f8341d47010a0553fd2d0c2586f2efa Reviewed-on: https://go-review.googlesource.com/c/tools/+/212957 Run-TryBot: Muir Manders <muir@mnd.rs> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org>
25 lines
517 B
Plaintext
25 lines
517 B
Plaintext
-- summary --
|
|
CompletionsCount = 225
|
|
CompletionSnippetCount = 62
|
|
UnimportedCompletionsCount = 4
|
|
DeepCompletionsCount = 5
|
|
FuzzyCompletionsCount = 8
|
|
RankedCompletionsCount = 56
|
|
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
|
|
|