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
The last line reveals Union[A, B, C] when it should be just Union[B, C]. It works if the type of bar is replaced by Union[A, B, C].
(Of course you'd probably never directly write Union[Union[A, B], C], but it's reasonable to write Union[AB, C] where AB is an alias for Union[A, B]. And the typing module documentation says Unions of Unions are flattened.)
The text was updated successfully, but these errors were encountered:
The last line reveals
Union[A, B, C]
when it should be justUnion[B, C]
. It works if the type ofbar
is replaced byUnion[A, B, C]
.(Of course you'd probably never directly write
Union[Union[A, B], C]
, but it's reasonable to writeUnion[AB, C]
whereAB
is an alias forUnion[A, B]
. And the typing module documentation says Unions of Unions are flattened.)The text was updated successfully, but these errors were encountered: