mirror of https://github.com/golang/go.git
In cases like:
var foo func(...interface{})
var one int
var two func() (int, int)
foo(<>)
At <> we were preferring "two()" over "one" because we were really
excited that the multi return value function was usable. "one" was not
preferred because the expected value is interface{} (we default to
saying candidates _don't_ match interface{} to give non-type based
aspects of candidate inference a chance to shine).
Fix by applying the corresponding interface{} logic to the assignees
checking: ignore the case of completing into func(...interface{})
since all multi return value functions would match.
Fixes golang/go#46378.
Change-Id: I355daa75e067e8b14508ca50b8d3b6b727df5fec
Reviewed-on: https://go-review.googlesource.com/c/tools/+/323509
Run-TryBot: Muir Manders <muir@mnd.rs>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Trust: Peter Weinberger <pjw@google.com>
|
||
|---|---|---|
| .. | ||
| builtin.go | ||
| completion.go | ||
| deep_completion.go | ||
| deep_completion_test.go | ||
| format.go | ||
| keywords.go | ||
| labels.go | ||
| literal.go | ||
| package.go | ||
| package_test.go | ||
| postfix_snippets.go | ||
| printf.go | ||
| printf_test.go | ||
| snippet.go | ||
| statements.go | ||
| util.go | ||
| util_test.go | ||