*Memo:
- mypy test.py
- mypy 1.19.1
- Python 3.14
- Windows 11
Using a type alias with arguments in case block in a match statement gets the wrong error message with parameters instead of arguments as shown below:
class Cls:
def __init__(self, x: int, y: int):
self.x = x
self.y = y
type TA = Cls
match Cls(x=10, y=20):
case TA(x=10, y=20):
print("OK")
error: Class pattern class must not be a type alias with type parameters
So, the error message should be with arguments instead of parameters as shown below:
error: Class pattern class must not be a type alias with type arguments