Tagged unions support #2160
Labels
addressed in next version
Issue is fixed and will appear in next published version
enhancement request
New feature or request
Is your feature request related to a problem? Please describe.
The following code uses tagged unions with
Literal
integer as discriminant:This type checks successfully with
mypy
as documented here (https://mypy.readthedocs.io/en/stable/literal_types.html#tagged-unions), however this type narrowing pattern is not supported by pyright.Describe the solution you'd like
It would be great if pyright would also support this type narrowing pattern.
The text was updated successfully, but these errors were encountered: