mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-01 06:11:43 +00:00
![]() ## Summary If `S <: T`, then `~T <: ~S`. This test currently fails with example like: ``` S = tuple[()] T = ~Literal[True] & ~Literal[False] ``` `T` is equivalent to `~(Literal[True] | Literal[False])` and therefore equivalent to `~bool`, but the minimal example for a failure is what is stated above. We correctly recognize that `S <: T`, but fail to see that `~T <: ~S`, i.e. `bool <: ~tuple[()]`. This is why the tests goes into the "flaky" section as well. ## Test Plan ``` export QUICKCHECK_TESTS=100000 while cargo test --release -p red_knot_python_semantic -- --ignored types::property_tests::flaky::negation_reverses_subtype_order; do :; done ``` |
||
---|---|---|
.. | ||
resources | ||
src | ||
tests | ||
build.rs | ||
Cargo.toml |