go/internal/typeparams
Robert Findley 1c35f2a5d7 internal/lsp/analysis: quick-fix to remove unnecessary type arguments
This CL adds a new infertypeargs analyzer, which finds call exprs where
type arguments could be inferred, and suggests a quick fix to simplify
them.

Along the way, may two changes to the supporting frameworks:
 - Initialized types.Info.Instances in go/packages
 - Fail analysis tests run with suggested fixes if formatting the
   resulting source fails.

Change-Id: Ib15e5bd7c26aa293c5fc18a4cff6bc047e9e31d2
Reviewed-on: https://go-review.googlesource.com/c/tools/+/351552
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2021-09-29 19:22:48 +00:00
..
common.go internal/typeparams: update x/tools for recent typeparams changes 2021-08-03 15:39:08 +00:00
common_test.go internal/typeparams: update x/tools for recent typeparams changes 2021-08-03 15:39:08 +00:00
enabled_go117.go Revert "internal/typeparams: hide go1.18 API usage behind a build constraint" 2021-09-28 23:30:19 +00:00
enabled_go118.go Revert "internal/typeparams: hide go1.18 API usage behind a build constraint" 2021-09-28 23:30:19 +00:00
typeparams_go117.go internal/lsp/analysis: quick-fix to remove unnecessary type arguments 2021-09-29 19:22:48 +00:00
typeparams_go118.go internal/lsp/analysis: quick-fix to remove unnecessary type arguments 2021-09-29 19:22:48 +00:00
typeparams_test.go internal/typeparams: filter out API diffs related to types.Environment 2021-09-29 15:31:12 +00:00