funtypes
funtypes copied to clipboard
ParsedValue in a union does not properly check the underlying type

I ran this complete example in Quokka to show the output inline.
If you want to use the ParsedValue in a union you need to either:
- Implement
test. - Ensure that
serializereturns{success: false, value: ... }when the value is not valid.
We can't test the underlying value first when in serialize mode because we need the serialised value in order to test it against the underlying type.