c1296af151
Most CONVIFACEs are created in the transform phase (or old typechecker, in -G=0 mode). But if the main result of a multi-value assignment (map, channel, or dot-type) must be converted to an interface during the assignment, that CONVIFACE is not created until (*orderState).as2ok in the order phase (because the AS2* ops and their sub-ops are so tightly intertwined). But we need to create the CONVIFACE during the stenciling/transform phase to enable dictionary lookups. So, in transformAssign(), if we are doing a special multi-value assignment involving a type-param-derived type, assign the results first to temps, so that we can manifest the CONVIFACE during the transform in assigning the first temp to lhs[0]. Added a test for both AS2RECV (channel receives) and AS2MAPR (maps). I don't think we can have a type assertion on a type-param-derived type. Fixes #50642 Change-Id: I4d079fc46c93d8494d7db4ea8234d91522edb02a Reviewed-on: https://go-review.googlesource.com/c/go/+/379054 Reviewed-by: Matthew Dempsky <mdempsky@google.com> Trust: Dan Scales <danscales@google.com> Run-TryBot: Dan Scales <danscales@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> |
||
---|---|---|
.github | ||
api | ||
doc | ||
lib/time | ||
misc | ||
src | ||
test | ||
.gitattributes | ||
.gitignore | ||
AUTHORS | ||
codereview.cfg | ||
CONTRIBUTING.md | ||
CONTRIBUTORS | ||
LICENSE | ||
PATENTS | ||
README.md | ||
SECURITY.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.