]> Cypherpunks repositories - gostls13.git/commit
[dev.typeparams] cmd/compile: always generate (*T).M wrappers for instantiated methods
authorDan Scales <danscales@google.com>
Sun, 16 May 2021 21:48:05 +0000 (14:48 -0700)
committerDan Scales <danscales@google.com>
Wed, 26 May 2021 21:39:54 +0000 (21:39 +0000)
commit4ed6317e735af24093b96077d1e813cc8b7dee6a
treedeea54bccec604d434c1611bbb517706153ff197
parentb7f7d1cd7b3d965ec25d365b3e5057ef3278c729
[dev.typeparams] cmd/compile: always generate (*T).M wrappers for instantiated methods

Always generate (*T).M wrappers for instantiated methods, even when the
instantiated method is being generated for another package (its source
package)

Added new function t.IsInstantiated() to check for fully-instantiated
types (generic type instantiated with concrete types, hence concrete
themselves). This function helps hide the representation of instantiated
types outside of the types package.

Added new export/import test setsimp.go that needs this change.

Change-Id: Ifb700db8c9494e1684c93735edb20f4709be5f7f
Reviewed-on: https://go-review.googlesource.com/c/go/+/322193
Trust: Dan Scales <danscales@google.com>
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/cmd/compile/internal/reflectdata/reflect.go
src/cmd/compile/internal/types/type.go
test/typeparam/setsimp.dir/a.go [new file with mode: 0644]
test/typeparam/setsimp.dir/main.go [new file with mode: 0644]
test/typeparam/setsimp.go [new file with mode: 0644]