go/internal/lsp/source
Robert Findley 707beb0c63 internal/lsp/source: descend into fields and field lists in qualifyExpr
We do a lot of gymnastics to format var types, working around the lack
of alias tracking in go/types. As part of this, we clone and qualify
expressions. In this case, we were not qualifying identifiers that were
contained within fields or field lists.

Fix this by updating our expression traversal to include *ast.Field and
*ast.FieldList.

Fixes golang/go#50539

Change-Id: I6531c6a51aa402bd784778b8bedaa3dccee75af0
Reviewed-on: https://go-review.googlesource.com/c/tools/+/395678
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-03-25 15:26:50 +00:00
..
completion lsp/completion: fix bogus generic func conversion 2022-03-22 17:37:31 +00:00
add_import.go internal/lsp: add list_known_packages and add_import commands 2021-05-23 03:57:00 +00:00
api_json.go internal/lsp/command: remove unnecessary json struct tag 2022-03-24 22:38:08 +00:00
call_hierarchy.go internal/lsp/source: check for nil objects in call hierarchy 2021-10-27 16:11:50 +00:00
code_lens.go
comment.go internal/lsp/source: refactor commentToMarkdown function 2021-05-19 23:19:09 +00:00
comment_test.go internal/lsp/source: refactor commentToMarkdown function 2021-05-19 23:19:09 +00:00
diagnostics.go internal/lsp: remove unused code 2022-03-17 13:53:41 +00:00
extract.go internal/lsp: adjust extract function range if block statement 2021-10-22 02:18:41 +00:00
fix.go gopls,internal/lsp: Implement method stubbing via CodeAction 2022-02-16 19:42:34 +00:00
folding_range.go internal/lsp: foldable multiline strings 2022-01-04 20:54:25 +00:00
format.go gopls: wire in LangVersion and ModulePath for gofumpt formatting 2022-02-24 18:08:50 +00:00
format_test.go internal/lsp: use source.Offset instead of tok.Offset 2021-10-12 22:12:04 +00:00
gc_annotations.go internal/lsp: key GC details off package ID 2021-03-02 22:01:38 +00:00
highlight.go internal/lsp/source: fix Highlight for std and 3rd-party packages 2021-04-05 22:17:18 +00:00
hover.go internal/lsp/source: include builtin name in hovered signature 2022-03-24 20:26:13 +00:00
identifier.go internal/lsp/source: simplify Identifier.enclosing 2022-02-17 17:36:57 +00:00
identifier_test.go internal/lsp/source: simplify Identifier.enclosing 2022-02-17 17:36:57 +00:00
implementation.go internal/lsp: use source.Offset instead of tok.Offset 2021-10-12 22:12:04 +00:00
known_packages.go internal/lsp: add list_known_packages and add_import commands 2021-05-23 03:57:00 +00:00
offset_test.go internal/lsp: use source.Offset instead of tok.Offset 2021-10-12 22:12:04 +00:00
options.go tools: fix some typos 2022-03-24 22:24:35 +00:00
options_test.go gopls: consistently capitalize enum variants for symbolStyle 2021-09-03 18:04:29 +00:00
references.go internal/lsp/source: canonicalize objects in reference/rename requests 2022-03-15 13:54:34 +00:00
rename.go internal/lsp/source: recursively search for qualified objects 2021-08-17 02:54:26 +00:00
rename_check.go internal/lsp: use LookupParent for finding scope 2021-08-11 21:39:32 +00:00
signature_help.go internal/lsp/source: clean up the interface to hover information 2022-02-17 17:38:22 +00:00
source_test.go gopls: remove the workspace_metadata command 2022-02-04 14:02:58 +00:00
stub.go internal/lsp/source: support stubbing concrete type params 2022-03-03 22:52:16 +00:00
symbols.go
types_format.go internal/lsp/source: descend into fields and field lists in qualifyExpr 2022-03-25 15:26:50 +00:00
util.go internal/lsp: add hover for go.work use statements 2022-03-04 19:55:36 +00:00
view.go internal/lsp: report diagnostics on go.work files 2022-03-04 18:29:58 +00:00
workspace_symbol.go internal/lsp: remove unused code 2022-03-17 13:53:41 +00:00
workspace_symbol_test.go internal/lsp/source: parse symbol queries when using fastfuzzy 2022-01-19 15:06:07 +00:00