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
Many clients will need something like this:
type Type interface {
...
IsAssignableTo(Type) bool
}
This is a generalization of the Implements predicate defined thus:
Implements(conc Type, iface *Interface) bool
in which you always have a concrete type and an interface.
FWIW, my code only needs the latter. Specifically,
ssa/interp only need this method:
func MissingMethod(conc types.Type, iface *types.Interface) *types.Method
ssa/pointer only needs this method:
func ImplementsInterface(conc types.Type, iface *types.Interface) bool {
return MissingMethod(conc, iface) == nil
}
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: