]> Cypherpunks repositories - gostls13.git/commit
go/types: update interface receivers after substituting
authorRobert Findley <rfindley@google.com>
Thu, 27 Jan 2022 01:50:51 +0000 (20:50 -0500)
committerRobert Findley <rfindley@google.com>
Thu, 27 Jan 2022 21:11:21 +0000 (21:11 +0000)
commitf5fe5a4524d5e5390238ae7f5abcaa4299b31a37
treef862162b2b223ae5e3d44e35a5a10a0f033ddaaa
parent1a2435c95f8c68c7d21d172c8a80c6cc96aa9cf5
go/types: update interface receivers after substituting

Interface method receivers are synthetic: they record either the
interface type or the the defined type for which they are the RHS of the
type declaration. When instantiating, we need to update these receivers
accordingly.

Fixes #50839

Change-Id: Icd8e1a2817b0135059d25d034b01b0ff5207641f
Reviewed-on: https://go-review.googlesource.com/c/go/+/381174
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/cmd/compile/internal/types2/api_test.go
src/cmd/compile/internal/types2/named.go
src/cmd/compile/internal/types2/subst.go
src/go/types/api_test.go
src/go/types/named.go
src/go/types/subst.go