diff options
author | Dan Scales <danscales@google.com> | 2021-05-16 14:48:05 -0700 |
---|---|---|
committer | Dan Scales <danscales@google.com> | 2021-05-26 21:39:54 +0000 |
commit | 4ed6317e735af24093b96077d1e813cc8b7dee6a (patch) | |
tree | deea54bccec604d434c1611bbb517706153ff197 /test/typeparam/setsimp.go | |
parent | b7f7d1cd7b3d965ec25d365b3e5057ef3278c729 (diff) | |
download | go-4ed6317e735af24093b96077d1e813cc8b7dee6a.tar.gz go-4ed6317e735af24093b96077d1e813cc8b7dee6a.zip |
[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>
Diffstat (limited to 'test/typeparam/setsimp.go')
-rw-r--r-- | test/typeparam/setsimp.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/typeparam/setsimp.go b/test/typeparam/setsimp.go new file mode 100644 index 0000000000..76930e5e4f --- /dev/null +++ b/test/typeparam/setsimp.go @@ -0,0 +1,7 @@ +// rundir -G=3 + +// Copyright 2021 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ignored |