mirror of
https://github.com/golang/go
synced 2024-11-18 14:14:46 -07:00
23e6869392
Consider this example: var foo, bar int if foo == 123 && b<> { } Completing at "<>" previously preferred the unimported "bytes.Contains()" function because it returns a bool. You often need to compose a boolean expression from non-boolean candidates, so preferring only bool candidates gives unhelpful results. Now we don't infer any expected type for "&&" and "||", which allows the example to prefer "bar" as the top candidate. Fixes golang/go#37163. Change-Id: Ic341da11dd626439cfb265d129288c5ca6008270 Reviewed-on: https://go-review.googlesource.com/c/tools/+/246362 Run-TryBot: Muir Manders <muir@mnd.rs> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org> |
||
---|---|---|
.. | ||
lsp | ||
missingdep | ||
missingtwodep | ||
unused | ||
upgradedep |