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
The problem is that for a definition like type timeTime time.Time the pkgPath of the struct is the package in which it is defined (in this case, main) and we use that pkgPath for the pkgPath of all the fields. But of course the fields are defined in package time.
Similarly, printing Field(i).PkgPath of reflect.TypeOf(timeTime) also prints the wrong value.
dnameField in cmd/compile/internal/gc/reflect.go assumes that it never needs to set the pkgPath of a field, but as far as I can tell that simply isn't true.
8d0c105 caused a regression in functionality of
ConvertibleTo
.The following test passes on Go 1.6 and 1.7, but fails on tip:
/cc @rsc, @crawshaw, @ianlancetaylor
The text was updated successfully, but these errors were encountered: