Enums do not exhaustively match correctly #14393
Labels
bug
mypy got something wrong
topic-match-statement
Python 3.10's match statement
topic-reachability
Detecting unreachable code
Bug Report
When I transform a value into an enum, an error occurs in the
match case
construct. If you convert the value in advance, there will be no error. Same issue #14109 #14264 .To Reproduce
https://mypy-play.net/?mypy=latest&python=3.11&gist=d28ae2af9f4545ca1c302476d8e4c782
https://mypy-play.net/?mypy=latest&python=3.11&gist=eab4deab65eb38a49649a46a2adc1e42
Actual Behavior
In the first example:
In the second example:
Your Environment
mypy.ini
(and other config files): N/AThe text was updated successfully, but these errors were encountered: