]> Cypherpunks repositories - gostls13.git/commit
[dev.typeparams] cmd/compile: convert generic values to interface type using dictionary
authorKeith Randall <khr@golang.org>
Sat, 5 Jun 2021 00:19:09 +0000 (17:19 -0700)
committerKeith Randall <khr@golang.org>
Mon, 7 Jun 2021 21:12:23 +0000 (21:12 +0000)
commitccfb0ce8df980599750db4fa56a8ab16202f1ba6
treeafe6960b73ee984cc32ceffe609ea642967207ef
parentcf4b6dc48eba807e7d85fb6ab30cbbbdb143c552
[dev.typeparams] cmd/compile: convert generic values to interface type using dictionary

When converting a variable of generic type to an interface, use the
entry in the dictionary for the type field instead of using the
compile-time type (which we only have when fully stenciling).

Note: this isn't all the conversions. Conversions often get processed
in the ir.OCALL case. Those aren't handled yet.

Change-Id: I9a6a4c572e3c54a8e8efad98365184dbb94c4487
Reviewed-on: https://go-review.googlesource.com/c/go/+/325330
Trust: Keith Randall <khr@golang.org>
Trust: Dan Scales <danscales@google.com>
Reviewed-by: Dan Scales <danscales@google.com>
src/cmd/compile/internal/escape/escape.go
src/cmd/compile/internal/noder/stencil.go