]> Cypherpunks repositories - gostls13.git/commit
[dev.typeparams] cmd/compile/internal/types2: move embedding positions from Checker...
authorRobert Griesemer <gri@golang.org>
Tue, 29 Jun 2021 00:21:26 +0000 (17:21 -0700)
committerRobert Griesemer <gri@golang.org>
Wed, 30 Jun 2021 18:59:58 +0000 (18:59 +0000)
commitf0206e3df2f134cb1a13402aefbb6caeec4fc126
tree3f064621a62e4c5590d054ca1421819655fdf27a
parent1ff43d1b179eb96a34b9007e10d78e2278643f3f
[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>
src/cmd/compile/internal/types2/check.go
src/cmd/compile/internal/types2/interface.go
src/cmd/compile/internal/types2/sizeof_test.go
src/cmd/compile/internal/types2/subst.go
src/cmd/compile/internal/types2/type.go