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
There are similar bug reports, but I'm not clear if any of them are the same cause or not. When using a Literal in the match statement, I get unreachable errors. The error doesn't occur if the Literal is replaced with int.
To Reproduce
Occupancy=tuple[Literal[1], int]
occ: Occupancymatchocc:
case (1, 5):
print(1)
case (1, 6):
print(2) # Unreachable error
Your Environment
Mypy version used: 1.10
Mypy command-line flags: --warn-unreachable
Python version used: 3.12
The text was updated successfully, but these errors were encountered:
Bug Report
There are similar bug reports, but I'm not clear if any of them are the same cause or not. When using a Literal in the match statement, I get unreachable errors. The error doesn't occur if the
Literal
is replaced withint
.To Reproduce
Your Environment
--warn-unreachable
The text was updated successfully, but these errors were encountered: