1
0
mirror of https://github.com/golang/go synced 2024-09-30 22:58:34 -06:00
go/internal
Muir Manders 8d77031968 internal/lsp/source: fix completion crash with untyped assignee
We were panicking when a LHS assignee's type was nil, such as:

    // "foo" has not been declared
    foo = 123

A recent refactoring changed (*completer).typeMatches() to no longer
gracefully handle a nil types.Type for its first parameter. That
behavior seems fine, so fix the problematic caller of typeMatches to
check for nil before calling.

Change-Id: Ie11e4a2d374ab1efbf6fd13fbe214e06d359fca0
Reviewed-on: https://go-review.googlesource.com/c/tools/+/221020
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2020-03-02 21:29:26 +00:00
..
apidiff all: fix more typos 2019-09-11 15:13:14 +00:00
fastwalk internal/fastwalk: fix checkptr failure on Darwin 2020-02-27 19:33:42 +00:00
gocommand internal/gocommand: kill gracefully 2020-02-25 21:33:51 +00:00
gopathwalk all: fix some staticcheck errors 2020-01-29 04:53:41 +00:00
imports all: consolidate invokeGo implementations 2020-02-25 21:33:46 +00:00
jsonrpc2 internal/lsp/lsprpc: clean up client session on disconnection 2020-02-24 23:23:05 +00:00
lsp internal/lsp/source: fix completion crash with untyped assignee 2020-03-02 21:29:26 +00:00
memoize internal/lsp/debug: serve cache entry counts 2020-02-03 22:21:18 +00:00
packagesinternal internal/lsp: add module versions from "go list" to pkg.go.dev links 2020-02-19 19:55:21 +00:00
span internal/span: handle URI escaping better 2020-02-18 20:59:02 +00:00
telemetry internal/telemetry: remove Flush method from exporter 2020-02-28 22:46:39 +00:00
testenv internal/testenv: reject the resolved 'go' command if it does not match runtime.GOROOT 2019-11-11 19:22:22 +00:00
tool internal/lsp, internal/tool: clean up command line of gopls 2019-12-16 17:36:52 +00:00
xcontext internal/lsp: stop making background contexts everywhere 2019-07-11 16:38:52 +00:00