// expected: (unexported method seal) // // A same-named method in another package is a DIFFERENT method: Go's method // identity includes the declaring package for an unexported name, so no type // outside unexported's package can satisfy its Sealed interface. Legacy reports // "cannot use &mine{...} ... (unexported method seal)"; stage4 accepted it // because the method sets matched by name. package main import "tests/restrictions/lib/unexported" type mine struct { n int32 } func (m *mine) seal() (n int32) { return m.n } func main() { var s unexported.Sealed = &mine{n: 1} println(s != nil) }