mirror of https://github.com/golang/go.git
Semantic tokens will now return typeParameters if the client will accept them. If the user is not using go1.18, then generic code will not type check and gopls will not recogize type parameters. If gopls has not been compiled with go1.18 only some uses of type parameters will be recognized. In any case the code uses internal/typeparams to see through IndexListExprs. There is a global parameter semDebug which should be false in checked-in code. I use it to see how semantic token decisions are made; it is for debugging. But there are a lot of small code changes to restrict logging to a few places. There is also an unexercised stub to fix a bug where some functions are misclassified as variables. This will be activated in a future CL, as it will also change the golden test files. Change-Id: I5107e67ae25e825b0cdc4c1a744877ce97ba609b Reviewed-on: https://go-review.googlesource.com/c/tools/+/352570 Trust: Peter Weinberger <pjw@google.com> Run-TryBot: Peter Weinberger <pjw@google.com> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Findley <rfindley@google.com> |
||
|---|---|---|
| .. | ||
| analysisinternal | ||
| apidiff | ||
| event | ||
| fakenet | ||
| fastwalk | ||
| gocommand | ||
| gopathwalk | ||
| imports | ||
| jsonrpc2 | ||
| jsonrpc2_v2 | ||
| lsp | ||
| memoize | ||
| mod | ||
| packagesinternal | ||
| proxydir | ||
| span | ||
| stack | ||
| testenv | ||
| tool | ||
| typeparams | ||
| typesinternal | ||
| xcontext | ||