go/internal/lsp/source/completion
Muir Manders ef80cdb6ec internal/lsp/completion: fix untyped int type inference
For index expressions, optional "make" args, and composite literal
slice/array keys, we were inferring an expected type of int instead of
untyped int. This caused candidate rankings to not be quite right in
general, and in particular, after support for automatic type
conversions was added, the issue manifested as:

    var foo []int
    var bar int32
    foo[ba<>] // completed to "int(bar)" instead of "bar"

Fixes golang/go#43375.

Change-Id: I6daef7d23b767f296bdbbc8f47f5b2c972ad9b80
Reviewed-on: https://go-review.googlesource.com/c/tools/+/289272
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Trust: Rebecca Stambler <rstambler@golang.org>
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
2021-02-05 20:20:24 +00:00
..
builtin.go internal/lsp/completion: fix untyped int type inference 2021-02-05 20:20:24 +00:00
completion.go internal/lsp/completion: fix untyped int type inference 2021-02-05 20:20:24 +00:00
deep_completion.go internal/lsp/source: handle nil pointer exception in completion 2020-11-14 22:40:30 +00:00
deep_completion_test.go
format.go internal/lsp: offer type converted completion candidates 2020-11-30 20:04:59 +00:00
keywords.go internal/lsp/source/completion: remove "completion_" prefix from files 2020-10-30 17:45:15 +00:00
labels.go internal/lsp/source/completion: remove "completion_" prefix from files 2020-10-30 17:45:15 +00:00
literal.go internal/lsp/source/completion: remove "completion_" prefix from files 2020-10-30 17:45:15 +00:00
package.go internal/lsp/source/completion: remove "completion_" prefix from files 2020-10-30 17:45:15 +00:00
printf.go internal/lsp: fix some incorrect spelling 2020-11-24 11:59:21 +00:00
printf_test.go internal/lsp/source/completion: remove "completion_" prefix from files 2020-10-30 17:45:15 +00:00
snippet.go internal/lsp/source/completion: remove "completion_" prefix from files 2020-10-30 17:45:15 +00:00
statements.go internal/lsp/source/completion: remove "completion_" prefix from files 2020-10-30 17:45:15 +00:00
util.go internal/lsp/source: omit assign stmt LHS in RHS completion 2020-12-07 20:43:33 +00:00
util_test.go