go/internal
Muir Manders fa7afc95f2 lsp/completion: improve generic func arg ranking
In cases like:

    func foo[A int|string](a A) {}

    foo[_](<>)

We now prefer ints and strings at <> by matching against the type
constraint. Note that even if "_" is replaced with "int", we still
prefer strings since the type checker doesn't seem to want to
instantiate foo unless the params check out.

Change-Id: I0e7acfef0775752a96fcfe23e7e2e3d939820eee
Reviewed-on: https://go-review.googlesource.com/c/tools/+/394017
Run-TryBot: Muir Manders <muir@mnd.rs>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Suzy Mueller <suzmue@golang.org>
Auto-Submit: Peter Weinberger <pjw@google.com>
2022-04-22 20:11:24 +00:00
..
analysisinternal go/analysis/passes/tests: Check malformed fuzz target. 2022-02-16 18:26:19 +00:00
apidiff all: gofmt 2022-04-12 17:53:17 +00:00
event all: gofmt 2022-04-12 17:53:17 +00:00
fakenet
fastwalk all: gofmt 2022-04-12 17:53:17 +00:00
gocommand internal/imports: update to permit multiple main modules 2022-02-22 17:36:43 +00:00
gopathwalk internal/gopathwalk: remove unnecessary call to os.Lstat 2022-03-31 05:33:07 +00:00
imports all: gofmt 2022-04-12 17:53:17 +00:00
jsonrpc2 internal/jsonrpc2*: remove usage of golang.org/x/xerrors 2022-04-20 16:10:40 +00:00
jsonrpc2_v2 internal/jsonrpc2*: remove usage of golang.org/x/xerrors 2022-04-20 16:10:40 +00:00
lsp lsp/completion: improve generic func arg ranking 2022-04-22 20:11:24 +00:00
memoize all: gofmt 2022-04-12 17:53:17 +00:00
packagesinternal x/tools/go/packages: on Go 1.19+, explicitly ask for -json fields needed 2022-04-19 17:08:06 +00:00
proxydir
span internal/span: fix a comment about windows drive letters 2021-08-03 19:59:22 +00:00
stack all: gofmt 2022-04-12 17:53:17 +00:00
testenv all: gofmt 2022-04-12 17:53:17 +00:00
tool gopls: cleanup the main help pages 2022-02-02 14:57:28 +00:00
typeparams all: gofmt 2022-04-12 17:53:17 +00:00
typesinternal internal/typesinternal: update typesinternal for 1.18 2022-02-22 16:42:18 +00:00
xcontext