1
0
mirror of https://github.com/golang/go synced 2024-11-18 22:44:48 -07:00
go/internal/lsp
Suzy Mueller b76e30ffa0 internal/lsp: fix references for type switch vars
Implicit local variables for type switches do not appear in the Uses
map and do not have objects associated with them.  This change
associates all of the different types objects for the same local type
switch declaration with one another in the declaration.

The identifier for the implicit local variable does not have a type but
does have declaration objects.

Find references for type switch vars will return references to all the
identifiers in all of the case clauses and the declaration.

Fixes golang/go#32584

Change-Id: I5563a2a48d31ca615c1e4e73b46eabca0f5dd72a
Reviewed-on: https://go-review.googlesource.com/c/tools/+/182462
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-06-19 18:18:01 +00:00
..
browser internal/lsp: add version and bug commands 2019-05-11 04:16:02 +00:00
cache internal/lsp: add a field on the package to store diagnostics 2019-06-19 16:20:43 +00:00
cmd internal/lsp: remove the redundant Server.Run() call. 2019-06-19 15:21:02 +00:00
debug internal/lsp: switching debug pages to not use the default mux 2019-06-18 23:29:48 +00:00
diff internal/lsp/diff: remove redundant memory allocate and copy operations in function 'shortestEditSequence'. 2019-06-17 16:22:25 +00:00
protocol internal/lsp: block rather than reject when the message queue is full 2019-06-14 18:56:17 +00:00
snippet
source internal/lsp: fix references for type switch vars 2019-06-19 18:18:01 +00:00
testdata internal/lsp: fix references for type switch vars 2019-06-19 18:18:01 +00:00
tests internal/lsp: fix references for type switch vars 2019-06-19 18:18:01 +00:00
xlog
code_action.go internal/lsp: add structured layers to the cache 2019-05-16 21:30:38 +00:00
completion.go internal/lsp: fix completion insertion 2019-05-17 18:32:58 +00:00
definition.go internal/lsp: attach documentation to signature help 2019-06-06 17:46:28 +00:00
diagnostics.go internal/lsp: parse filenames only out of go list errors 2019-06-14 19:27:58 +00:00
format.go internal/lsp: add structured layers to the cache 2019-05-16 21:30:38 +00:00
general.go internal/lsp: enable textDocument/didSave notifications 2019-06-18 23:32:49 +00:00
highlight.go internal/lsp: add structured layers to the cache 2019-05-16 21:30:38 +00:00
hover.go internal/lsp: attach documentation to signature help 2019-06-06 17:46:28 +00:00
link.go internal/lsp: build the packages config on demand from proper configuration 2019-05-21 17:12:43 +00:00
lsp_test.go internal/span: change URI.Filename so it just returns the filename 2019-06-10 21:39:43 +00:00
references.go internal/lsp: add find all references 2019-06-10 19:06:22 +00:00
reset_golden.sh internal/lsp: fix definition tests to use golden files 2019-05-10 21:06:55 +00:00
server.go internal/lsp: remove the redundant Server.Run() call. 2019-06-19 15:21:02 +00:00
signature_help.go internal/lsp: reply with nil, rather than empty, signature help 2019-06-08 02:21:20 +00:00
symbols.go internal/lsp: add structured layers to the cache 2019-05-16 21:30:38 +00:00
text_synchronization.go internal/lsp: clear diagnostics when all files from a package are closed 2019-06-14 20:56:25 +00:00
util.go internal/span: change URI.Filename so it just returns the filename 2019-06-10 21:39:43 +00:00
workspace.go internal/lsp: build the packages config on demand from proper configuration 2019-05-21 17:12:43 +00:00