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
#22075 makes it such that NumMethod no longer counts unexported methods for interfaces (and by implication the inability to obtain information about unexported methods).
I propose we add a reflect.Type.QualifiedString method that ensures the following property:
t1.QualifiedString() == t2.QualifiedString() if and only if t1 == t2
I don't have any strong preferences for the content of the string other than it be a humanly readable representation of the type. If the output is Go syntax, perhaps the method can be called GoString.
#22075 makes it such that
NumMethod
no longer counts unexported methods for interfaces (and by implication the inability to obtain information about unexported methods).One use case this breaks is https://github.com/google/go-cmp/blob/566225a2554cf156c7af1006dc3a0940e1e02b09/cmp/internal/value/name.go#L133-L146, where the goal is to print fully-qualified type information about a Go type (i.e.,
reflect.Type.String
is insufficiently detailed). With theNumMethod
change, I can no longer print unnamed interfaces in a way where users can tell that they are different.I propose we add a
reflect.Type.QualifiedString
method that ensures the following property:I don't have any strong preferences for the content of the string other than it be a humanly readable representation of the type. If the output is Go syntax, perhaps the method can be called
GoString
.\cc @mdempsky
The text was updated successfully, but these errors were encountered: