1
0
mirror of https://github.com/golang/go synced 2024-11-18 14:14:46 -07:00
go/internal/lsp/testdata
Muir Manders 23e6869392 internal/lsp/source: don't prefer bool candidates in bool exprs
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>
2020-08-06 23:41:14 +00:00
..
lsp internal/lsp/source: don't prefer bool candidates in bool exprs 2020-08-06 23:41:14 +00:00
missingdep internal/lsp: fix go.mod.golden test file to have sorted mod names 2020-07-30 22:19:56 +00:00
missingtwodep internal/lsp: support extract function 2020-07-20 18:55:41 +00:00
unused internal/lsp: support extract function 2020-07-20 18:55:41 +00:00
upgradedep internal/lsp: support extract function 2020-07-20 18:55:41 +00:00