Invariant class is incompatible with its base class in contravariant context #4517
Labels
addressed in next version
Issue is fixed and will appear in next published version
bug
Something isn't working
The following code gives me an error:
Pyright says that
Bar[int]
is incompatible withFoo[int]
, which is obviously incorrect. If I extractBar[int]
andFoo[int]
fromContra
pyright actually allows assigningBar[int]
toFoo[int]
:So I think something is going wrong specifically in contravariant context which makes pyright unable to bind
int
toT@Bar
.Additional context
pyright 1.1.290
The text was updated successfully, but these errors were encountered: