aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/types2/subst.go
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2021-06-28 17:21:26 -0700
committerRobert Griesemer <gri@golang.org>2021-06-30 18:59:58 +0000
commitf0206e3df2f134cb1a13402aefbb6caeec4fc126 (patch)
tree3f064621a62e4c5590d054ca1421819655fdf27a /src/cmd/compile/internal/types2/subst.go
parent1ff43d1b179eb96a34b9007e10d78e2278643f3f (diff)
downloadgo-f0206e3df2f134cb1a13402aefbb6caeec4fc126.tar.gz
go-f0206e3df2f134cb1a13402aefbb6caeec4fc126.zip
[dev.typeparams] cmd/compile/internal/types2: move embedding positions from Checker to Interface
This change moves the position information to the place where it is actually used. It also simplifies getting rid of it after use. In the process, fixed a latent bug: Before this CL, embedded types were sorted, but the corresponding embedding positions were not. Removed the sorting altogether as it is not needed for type-checking. Change-Id: I48003f317196d814326424430336b6cb222fdee6 Reviewed-on: https://go-review.googlesource.com/c/go/+/331514 Trust: Robert Griesemer <gri@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
Diffstat (limited to 'src/cmd/compile/internal/types2/subst.go')
-rw-r--r--src/cmd/compile/internal/types2/subst.go1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/types2/subst.go b/src/cmd/compile/internal/types2/subst.go
index 38bd07b8a2..db01c36f7a 100644
--- a/src/cmd/compile/internal/types2/subst.go
+++ b/src/cmd/compile/internal/types2/subst.go
@@ -316,7 +316,6 @@ func (subst *subster) typ(typ Type) Type {
if subst.check == nil {
panic("internal error: cannot instantiate interfaces yet")
}
- subst.check.posMap[iface] = subst.check.posMap[t] // satisfy completeInterface requirement
return iface
}