Invalid type inferred when overloading __call__ with generic self-type #8283
Labels
bug
mypy got something wrong
false-positive
mypy gave an error on correct code
priority-1-normal
topic-overloads
Seems like mypy uses the first overloaded
__call__
signature when using self-type. There is no problem with overloading another dunder method (I tried__get__
) or with regular overload (__call__
but without self-type). If use another method name, for examplecall
, then everything works fine.Below is snippet to illustrate the problem:
The text was updated successfully, but these errors were encountered: