Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve protovalidate overloads (#36)
Update all of the protovalidate overload functions to add proper type checking and return Err.noSuchOverload if the types are incorrect. Greatly simplify the unique implementation as it didn't need to support non-list arguments. Fix a bug in the unique implementation for bytes (if the bytes contained invalid UTF-8). Add testcases for unique and additional tests for invalid arguments. Update Format.format to use exceptions for control flow instead of having to distinguish Val.Err from other types (a lot of places were just returning null). Remove all places where we used '==' to compare object type instances with comparing using enum types (which is safe for '==' comparison).
- Loading branch information