commit | 35a9159336abb5bc5040b25c5a3ddf1424de1d8d | [log] [tgz] |
---|---|---|
author | Rob Findley <rfindley@google.com> | Mon Apr 05 23:21:25 2021 -0400 |
committer | Robert Findley <rfindley@google.com> | Tue Apr 06 13:38:10 2021 +0000 |
tree | 9d5cc5fe0502134a54b850d447346ec19d2deac6 | |
parent | 5d334387e1e03040456e1bfe650c6d8b036eb467 [diff] |
go/internal/gcimporter: ensure that imported floats are of float kind As of CL 290630, go/types enforces some bitsize limits on integer const values. We need to be careful to preserve the constant Kind when importing from gc export data. Ideally we could follow CL 288632, but the go/constant APIs used in that CL are not available to x/tools, which (at least for the moment) must still build at go1.12. Instead, simply call constant.ToFloat to force the Kind. Add a test for the imported Kind. This test should probably also be upstreamed to std/go/internal/gcimporter, now that go/types relies on this behavior. Change-Id: I84b4b15b398962305aa6e3e9e12ede6a7373230b Reviewed-on: https://go-review.googlesource.com/c/tools/+/307590 Trust: Robert Findley <rfindley@google.com> Trust: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Findley <rfindley@google.com> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
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 prettier to format JS and CSS files.
The version of prettier
used is 1.18.2.
It is encouraged that all JS and CSS code be run through this before submitting a change. However, it is not a strict requirement enforced by CI.
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.