aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/noder/types.go
diff options
context:
space:
mode:
authorKeith Randall <khr@golang.org>2021-06-09 19:30:16 -0700
committerKeith Randall <khr@golang.org>2021-07-21 21:04:15 +0000
commita7a17f0ca86d252dc1ef20b5852c352ade5f8610 (patch)
treefdc726eb6a687dfb988e927fdef467cd393bfaa1 /src/cmd/compile/internal/noder/types.go
parent897970688b326f7baa8ad8e3330fb552d94b0014 (diff)
downloadgo-a7a17f0ca86d252dc1ef20b5852c352ade5f8610.tar.gz
go-a7a17f0ca86d252dc1ef20b5852c352ade5f8610.zip
[dev.typeparams] cmd/compile: introduce named gcshape types
Still 1-1 with real types, but now with their own names! Shape types are implicitly convertible to (and convertible from) the types they represent. Change-Id: I0133a8d8fbeb369380574b075a32b3c987e314d5 Reviewed-on: https://go-review.googlesource.com/c/go/+/335170 Run-TryBot: Keith Randall <khr@golang.org> Trust: Keith Randall <khr@golang.org> Trust: Dan Scales <danscales@google.com> Reviewed-by: Dan Scales <danscales@google.com>
Diffstat (limited to 'src/cmd/compile/internal/noder/types.go')
-rw-r--r--src/cmd/compile/internal/noder/types.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/noder/types.go b/src/cmd/compile/internal/noder/types.go
index c18ae3a1fc3..d073526adaf 100644
--- a/src/cmd/compile/internal/noder/types.go
+++ b/src/cmd/compile/internal/noder/types.go
@@ -327,7 +327,7 @@ func (g *irgen) fillinMethods(typ *types2.Named, ntyp *types.Type) {
methods[i].Nname = meth
}
ntyp.Methods().Set(methods)
- if !ntyp.HasTParam() {
+ if !ntyp.HasTParam() && !ntyp.HasShape() {
// Generate all the methods for a new fully-instantiated type.
g.instTypeList = append(g.instTypeList, ntyp)
}