In reflect.go:genfun, the code to walk method sets in parallel to compute itab entries doesn't take packages into account for finding the right non-exported method. This causes the code below to print FAIL instead of ok, because it selects U.m instead of T.m for the itab.
$ cat z.go
package z
type T int
func (T) m() { println("ok") }
func F(i interface{ m() }) { i.m() }
$ cat main.go
package main
import "./z"
type U struct{ z.T }
func (U) m() { println("FAIL") }
func main() { z.F(U{}) }
$ go tool compile z.go
$ go tool compile main.go
$ go tool link main.o
$ ./a.out
FAIL
In reflect.go:genfun, the code to walk method sets in parallel to compute itab entries doesn't take packages into account for finding the right non-exported method. This causes the code below to print
FAILinstead ofok, because it selects U.m instead of T.m for the itab.