mypy doesn't take value restrictions into account when solving type variables #11880
Labels
affects-typeshed
Anything that blocks a typeshed change
bug
mypy got something wrong
topic-type-variables
This came up in python/typeshed#6762
Looking at the output, my guess is that mypy isn't taking value restrictions into account when solving constraints and only using value restriction as a check later. That is, list[Any] cannot match the T part of T | list[T] because it would violate the value restriction.
The text was updated successfully, but these errors were encountered: