[Pitch] Property-Based Type Narrowing and Union Types

:thinking:I think "Union Types" is listed in Commonly Rejected Changes.

  • Disjunctions (logical ORs) in type constraints: These include anonymous union-like types (e.g. (Int | String) for a type that can be inhabited by either an integer or a string). "[This type of constraint is] something that the type system cannot and should not support."

That is source breaking change:

5 Likes