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
Ok, I have released a fix for this. The second test case, .default(...).addValidator(...) now works correctly.
The first test case, .addValidator(...).default(...), will now throw an IllegalStateException, as this is a potentially unsafe operation, since .default can actually change the type (for example, making it nullable, or by making it a supertype), and then there's no way to pass the default value to the validator.
I'm debating whether to make it possible to add a validator before a default, and simply have the validator not called when the default is used. This is potentially surprising behavior.
The following code
receives the default value of 0 and gets labeled as optional, while
does not, and gets labeled as required parameter.
The text was updated successfully, but these errors were encountered: