mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-29 16:03:50 +00:00
![]() ## Summary - Properly treat the empty intersection as being of type `object`. - Consequently, change the simplification method to explicitly add `Never` to the positive side of the intersection when collapsing a type such as `int & str` to `Never`, as opposed to just clearing both the positive and the negative side. - Minor code improvement in `bindings_ty`: use `peekable()` to check whether the iterator over constraints is empty, instead of handling first and subsequent elements separately. fixes #13870 ## Test Plan - New unit tests for `IntersectionBuilder` to make sure the empty intersection represents `object`. - Markdown-based regression test for the original issue in #13870 |
||
---|---|---|
.. | ||
resources | ||
src | ||
tests | ||
build.rs | ||
Cargo.toml |