1
0
mirror of https://github.com/golang/go synced 2024-11-18 12:34:42 -07:00
go/internal/lsp/analysis
Josh Baum cef9fc3bc8 internal/lsp/analysis/fillreturns: broaden type equality
The existing implementation contains strict equality rules for
comparing the return type in the function declaration against
the return types in the function body. This causes the code in the
return statement to be incorrectly overriden with its corresponding
zero value type by the fillreturns analyzer.

Fixes golang/go#38707

Change-Id: I07522aaf85f2a5f811a86cbc0951ae61035ff55e
Reviewed-on: https://go-review.googlesource.com/c/tools/+/236617
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2020-06-05 18:10:38 +00:00
..
fillreturns internal/lsp/analysis/fillreturns: broaden type equality 2020-06-05 18:10:38 +00:00
nonewvars internal/lsp: add type error fixes to existing diagnostics 2020-04-08 01:45:16 +00:00
noresultvalues internal/lsp: add type error fixes to existing diagnostics 2020-04-08 01:45:16 +00:00
simplifycompositelit internal/lsp: make sure that gofmt -s analyses don't modify AST 2020-04-06 21:01:14 +00:00
simplifyrange internal/lsp: make sure that gofmt -s analyses don't modify AST 2020-04-06 21:01:14 +00:00
simplifyslice internal/lsp: make sure that gofmt -s analyses don't modify AST 2020-04-06 21:01:14 +00:00
undeclaredname internal/lsp: add type error fixes to existing diagnostics 2020-04-08 01:45:16 +00:00
unusedparams internal/lsp/analysis: add pass for unused parameters 2020-03-26 20:36:28 +00:00