Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[red-knot] handle unions on the LHS of is_subtype_of (#13857)
## 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`
- Loading branch information