From f0206e3df2f134cb1a13402aefbb6caeec4fc126 Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Mon, 28 Jun 2021 17:21:26 -0700 Subject: [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 Reviewed-by: Robert Findley --- src/cmd/compile/internal/types2/subst.go | 1 - 1 file changed, 1 deletion(-) (limited to 'src/cmd/compile/internal/types2/subst.go') 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 } -- cgit v1.2.3-54-g00ecf