mirror of
https://github.com/golang/go
synced 2024-11-05 18:26:10 -07:00
dc31b401ab
In a case where the type info for an ast.CompositeLit isn't found in forEachLexicalRef(...) gopls will panic. e.g. trying to rename "foo" where it is declared in this case: func fn() { var foo bool make(map[string]bool if foo { } } Note the missing ')' after make. This change will skip ast.CompositeLits if the type can't be found, and that fixes the panic. But it also do rename the identifier as long as it is possible, and I'm not convinced that we should allow rename at all if the source can't be compiled. Updates golang/go#39614 Change-Id: Ibb50b15ce4b31056f2f1da52a4dcab7b8b91a320 Reviewed-on: https://go-review.googlesource.com/c/tools/+/238042 Reviewed-by: Rebecca Stambler <rstambler@golang.org> Run-TryBot: Rebecca Stambler <rstambler@golang.org> |
||
---|---|---|
.. | ||
indirect | ||
lsp | ||
missingdep | ||
missingtwodep | ||
unused | ||
upgradedep |