PRs #10 and #11 added reflection-based checks for interface implementations (internal interfaces defining a ZodSchema() methods, and the json.Marshaler interface). But since ConvertType() unwraps pointers before proceeding with conversion, and the underlying type does not implement the interface if the method was defined with a pointer receiver, we did not detect interface implementations using pointer receivers.
This change addresses that problem by checking .Implements() both on the type directly and on a pointer to the type.
PRs #10 and #11 added reflection-based checks for interface implementations (internal interfaces defining a ZodSchema() methods, and the json.Marshaler interface). But since ConvertType() unwraps pointers before proceeding with conversion, and the underlying type does not implement the interface if the method was defined with a pointer receiver, we did not detect interface implementations using pointer receivers.
This change addresses that problem by checking .Implements() both on the type directly and on a pointer to the type.