mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-01 17:32:25 +00:00
![]() ## Summary `KnownInstance::instance_fallback` may return instances of supertypes. For example, it returns an instance of `_SpecialForm` for `Literal`. This means it can't be used on the right-hand side of `is_subtype_of` relationships, because it might lead to false positives. I can lead to false negatives on the left hand side of `is_subtype_of`, but this is at least a known limitation. False negatives are fine for most applications, but false positives can lead to wrong results in intersection-simplification, for example. closes #14731 ## Test Plan Added regression test |
||
---|---|---|
.. | ||
resources | ||
src | ||
tests | ||
build.rs | ||
Cargo.toml |