1
0
mirror of https://github.com/golang/go synced 2024-10-01 08:18:32 -06:00
go/internal/lsp/analysis
Josh Baum 40866c6c36 internal/lsp/analysis/fillreturns: implement matching in fillreturns
The existing implementation looks for matching types in the declaration
and the leftmost value in the return statement. Instead, the analyzer
now searches across all the values in the return statement to find one
that matches the type in the declaration. Additionally, if a value in
the return statement does not match any type in the declaration, it is
not overriden.

Change-Id: I4d4aed0ef67e59bfd886b44055d523a8c478255c
Reviewed-on: https://go-review.googlesource.com/c/tools/+/236962
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2020-06-11 16:18:57 +00:00
..
fillreturns internal/lsp/analysis/fillreturns: implement matching in fillreturns 2020-06-11 16:18:57 +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