Closed layday closed 1 year ago
You're right, our optional handling is very old and can be improved. Taking a look at it now.
This should be fixed on main now, let me know!
Yep, works now, thanks.
Although, if I replace | None
with e.g. | bool
, it doesn't - not sure if that's intentional. String subclasses work with other kinds of unions.
Yeah we don't support any union, just a subset for now. It's tricky to do well.
Alright, thanks for clarifying!
Description
NewType
unstructure hooks are not invoked if the new type appears in a union with other types.What I Did