False positive when type checking overloads with generics #9023
Labels
bug
mypy got something wrong
false-positive
mypy gave an error on correct code
priority-1-normal
topic-overloads
topic-type-variables
Are you reporting a bug, or opening a feature request? Bug
MyPy has some strange behavior when type-checking overloaded functions with multiple generic parameters.
Example
Actual behavior
If I swap the order of the parameters on line 12 then mypy complains about signature 1 instead of signature 2.
I can get mypy to accept the module by adding a dummy parameter in signature 2:
Expected behavior
Versions
Do you see the same issue after installing mypy from Git master? Yes
The text was updated successfully, but these errors were encountered: