In types1 and for the export format, we were using type param subscripts coming from types2 (originally for debugging) to provide unique names. We need unique full-names for type params in types1 to ensure consistent references to type params in function/method bodies and type params derived from translation from types2. We also currently need unique names for type params in importer/iimport.go and gcimporter/iimport.go, because there are no levels of scoping in the package symbol lookup and pkgIndex table. As a step to eliminate the typeparam subscripts (which have no relation to the source code), we change so that the typeparams' unique name is just prefixing the type param name with the name of the enclosing generic function, type, or method. We now no longer use types2.TypeString in types2-to-types1 translation, so Typestring can be changed to eliminate the subscript, as needed. Also, types2.TypeParam.SetId() is no longer needed and is eliminated. We can decide later if we want to do the further step of adding scoping to the importer/iimport.go and gcimporter/iimport.go, which could be used to eliminate the type param "path" prefix from the export format. Change-Id: I0e37795664be2c2e1869b8f9e93393b83fc56409 Reviewed-on: https://go-review.googlesource.com/c/go/+/353135 Trust: Dan Scales <danscales@google.com> Run-TryBot: Dan Scales <danscales@google.com> Reviewed-by: Robert Findley <rfindley@google.com> |
||
|---|---|---|
| .github | ||
| api | ||
| doc | ||
| lib/time | ||
| misc | ||
| src | ||
| test | ||
| .gitattributes | ||
| .gitignore | ||
| AUTHORS | ||
| CONTRIBUTING.md | ||
| CONTRIBUTORS | ||
| LICENSE | ||
| PATENTS | ||
| README.md | ||
| SECURITY.md | ||
| codereview.cfg | ||
README.md
The Go Programming Language
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 3.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Download and Install
Binary Distributions
Official binary distributions are available at https://golang.org/dl/.
After downloading a binary release, visit https://golang.org/doc/install for installation instructions.
Install From Source
If a binary distribution is not available for your combination of operating system and architecture, visit https://golang.org/doc/install/source for source installation instructions.
Contributing
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines at https://golang.org/doc/contribute.
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://golang.org/wiki/Questions for a list of places to ask questions about the Go language.