Issue with decorator and generic type arguments #7033
Labels
bug
mypy got something wrong
false-positive
mypy gave an error on correct code
priority-1-normal
topic-type-variables
I seem to be getting some odd incorrect types when I wrap a method in a decorator and that method takes generic parameters.
Here is a minimal example that should pass type checking, but fails on the last line with
Incompatible return value type (got "Abstraction[V, V]", expected "Abstraction[T, V]")
:And here is a slightly more realistic version of the same example, with the same error:
I tested this with the last master commit:
I tried it with the new semantic analyzer on and off and I get the same result.
EDIT: Not that if I do not use the
decorator
both of these examples type check properly.The text was updated successfully, but these errors were encountered: