Tagged unions not narrowed down correctly for TypedDicts #1240
Labels
enhancement
New feature or request
fixed in next version (main)
A fix has been implemented and will appear in an upcoming version
Environment data
Expected behaviour
The ability to discriminate between two TypedDicts using a Literal type, as explained in detail here: https://mypy.readthedocs.io/en/stable/literal_types.html#tagged-unions
Actual behaviour
The Union type doesn't get narrowed by a check on the Literal:
The text was updated successfully, but these errors were encountered: