no error on TypeVar
with explicitly declared variance when the generic is used in another type with a different variance
#17909
Labels
bug
mypy got something wrong
playground
in this example, the variance rules are inverted when the generic is passed to another class where it becomes contravariant (as in, the generic must now only be used in an output position)
The text was updated successfully, but these errors were encountered: