Unwrap type[Union[...]] when solving typevar constraints
#18266
Merged
type[Union[...]] when solving typevar constraints
#18266