1
0
mirror of https://github.com/golang/go synced 2024-11-19 02:24:41 -07:00
go/internal/lsp/testdata/builtins
Muir Manders bc0b458b10 internal/lsp/source: improve completion for "make()" args
Fix type inference to expect a type name for the first "make()"
parameter and an integer for later parameters. For example:

   // Previously we expected "[]int{}", now we expect "[]int".
   var _ []int = make(<>)

Note that we don't currently support actually completing to unnamed
type names like "[]int", but this improvement at least eliminates
nonsensical completion suggestions.

   // Previously we had no expectation, now we expect an int.
   var _ []int = make([]int, <>)

Change-Id: Ifd349767662ab6902d3a3ea9e52de7df70cb37c7
Reviewed-on: https://go-review.googlesource.com/c/tools/+/217310
Run-TryBot: Muir Manders <muir@mnd.rs>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ingo Oeser <nightlyone@googlemail.com>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2020-02-02 23:20:50 +00:00
..
builtin_args.go internal/lsp/source: improve completion for "make()" args 2020-02-02 23:20:50 +00:00
builtins.go internal/lsp: downrank "nil" completion candidate 2019-12-12 05:12:00 +00:00
constants.go internal/lsp/source: don't downrank builtin constant completions 2020-01-07 18:15:58 +00:00