]> Cypherpunks repositories - gostls13.git/commit
go/types: type-check embedded methods in correct scope (regression)
authorRobert Griesemer <gri@golang.org>
Thu, 22 Feb 2018 18:43:35 +0000 (10:43 -0800)
committerRobert Griesemer <gri@golang.org>
Mon, 26 Feb 2018 18:46:26 +0000 (18:46 +0000)
commit99843e22e81045ba5e6776095a2cb3ef5704c70e
tree5b973e7fa831fba77472f323d141c87837f8f455
parent85caeafb8c0d4c6926d67ce2939470780fab1a04
go/types: type-check embedded methods in correct scope (regression)

Change https://go-review.googlesource.com/79575 fixed the computation
of recursive method sets by separating the method set computation from
type computation. However, it didn't track an embedded method's scope
and as a result, some methods' signatures were typed in the wrong
context.

This change tracks embedded methods together with their scope and
uses that scope for the correct context setup when typing those
method signatures.

Fixes #23914.

Change-Id: If3677dceddb43e9db2f9fb3c7a4a87d2531fbc2a
Reviewed-on: https://go-review.googlesource.com/96376
Reviewed-by: Alan Donovan <adonovan@google.com>
src/go/types/interfaces.go
src/go/types/testdata/importdecl1a.src
src/go/types/testdata/importdecl1b.src
src/go/types/typexpr.go