commit | c7e21b3ad8ba13e79b34779c66db8f7b6f2324da | [log] [tgz] |
---|---|---|
author | Muir Manders <muir@mnd.rs> | Tue Feb 25 19:05:59 2020 -0800 |
committer | Rebecca Stambler <rstambler@golang.org> | Wed Mar 11 18:02:17 2020 +0000 |
tree | 3c4c6716990c5be2f694ea2f3e3709248a69cddd | |
parent | 23e62d300db3e249673f8e653fae6e74d09e21e2 [diff] |
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> (cherry picked from commit 8d7703196892497b9b2e19dc1ef932bbf16b9fb8) Reviewed-on: https://go-review.googlesource.com/c/tools/+/222979 Reviewed-by: Heschi Kreinick <heschi@google.com>
This subrepository holds the source for various packages and tools that support the Go programming language.
Some of the tools, godoc
and vet
for example, are included in binary Go distributions.
Others, including the Go guru
and the test coverage tool, can be fetched with go get
.
Packages include a type-checker for Go and an implementation of the Static Single Assignment form (SSA) representation for Go programs.
The easiest way to install is to run go get -u golang.org/x/tools/...
. You can also manually git clone the repository to $GOPATH/src/golang.org/x/tools
.
This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html.
The main issue tracker for the tools repository is located at https://github.com/golang/go/issues. Prefix your issue with “x/tools/(your subdir):” in the subject line, so it is easy to find.