You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This program panics on tip but exits normally with earlier versions of Go.
package main
import (
"reflect"
)
type S struct {}
func (s *S) Get() int { return 0 }
type I interface {
F(*S)
}
func main() {
ft := reflect.TypeOf((*I)(nil)).Elem()
m := ft.Method(0)
mt := m.Type
for i := 0; i < mt.NumIn(); i++ {
if mt.In(i).PkgPath() != "" {
panic(mt.In(i).PkgPath())
}
}
}
The text was updated successfully, but these errors were encountered:
package main
import (
"reflect"
)
type S struct {}
func (s *S) Get() int { return 0 }
func main() {
st := reflect.TypeOf((*S)(nil))
if st.PkgPath() != "" {
panic(st.PkgPath())
}
}
This program panics on tip but exits normally with earlier versions of Go.
The text was updated successfully, but these errors were encountered: