mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-29 16:03:50 +00:00
![]() ## Summary Just a drive-by change that occurred to me while I was looking at `Type::is_subtype_of`: the existing pattern for unions on the *right hand side*: ```rs (ty, Type::Union(union)) => union .elements(db) .iter() .any(|&elem_ty| ty.is_subtype_of(db, elem_ty)), ``` is not (generally) correct if the *left hand side* is a union. ## Test Plan Added new test cases for `is_subtype_of` and `!is_subtype_of` |
||
---|---|---|
.. | ||
resources | ||
src | ||
tests | ||
build.rs | ||
Cargo.toml |