diff --git a/go/internal/gcimporter/gcimporter_test.go b/go/internal/gcimporter/gcimporter_test.go index 07506bdb..dce607fd 100644 --- a/go/internal/gcimporter/gcimporter_test.go +++ b/go/internal/gcimporter/gcimporter_test.go @@ -336,7 +336,7 @@ func verifyInterfaceMethodRecvs(t *testing.T, named *types.Named, level int) { // check embedded interfaces (if they are named, too) for i := 0; i < iface.NumEmbeddeds(); i++ { // embedding of interfaces cannot have cycles; recursion will terminate - if etype, _ := iface.EmbeddedType(i).(*types.Named); etype != nil { + if etype, _ := embeddedType(iface, i).(*types.Named); etype != nil { verifyInterfaceMethodRecvs(t, etype, level+1) } } diff --git a/go/internal/gcimporter/newInterface10.go b/go/internal/gcimporter/newInterface10.go index 463f2522..0aca5711 100644 --- a/go/internal/gcimporter/newInterface10.go +++ b/go/internal/gcimporter/newInterface10.go @@ -19,3 +19,7 @@ func newInterface(methods []*types.Func, embeddeds []types.Type) *types.Interfac } return types.NewInterface(methods, named) } + +func embeddedType(iface *types.Interface, i int) types.Type { + return iface.Embedded(i) +} diff --git a/go/internal/gcimporter/newInterface11.go b/go/internal/gcimporter/newInterface11.go index 58d1735e..e802f8a3 100644 --- a/go/internal/gcimporter/newInterface11.go +++ b/go/internal/gcimporter/newInterface11.go @@ -11,3 +11,7 @@ import "go/types" func newInterface(methods []*types.Func, embeddeds []types.Type) *types.Interface { return types.NewInterface2(methods, embeddeds) } + +func embeddedType(iface *types.Interface, i int) types.Type { + return iface.EmbeddedType(i) +}