[red-knot] Promote the all_type_pairs_are_assignable_to_their_union property test to stable (#15739)

This commit is contained in:
Alex Waygood 2025-01-25 16:26:37 +00:00 committed by GitHub
parent d8c2d20325
commit a77a32b7d4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -467,6 +467,13 @@ mod stable {
assignable_to_is_reflexive, db,
forall types t. t.is_assignable_to(db, t)
);
// For *any* pair of types, whether fully static or not,
// each of the pair should be assignable to the union of the two.
type_property_test!(
all_type_pairs_are_assignable_to_their_union, db,
forall types s, t. s.is_assignable_to(db, union(db, [s, t])) && t.is_assignable_to(db, union(db, [s, t]))
);
}
/// This module contains property tests that currently lead to many false positives.
@ -515,13 +522,6 @@ mod flaky {
forall types s, t. intersection(db, [s, t]).is_assignable_to(db, s) && intersection(db, [s, t]).is_assignable_to(db, t)
);
// For *any* pair of types, whether fully static or not,
// each of the pair should be assignable to the union of the two.
type_property_test!(
all_type_pairs_are_assignable_to_their_union, db,
forall types s, t. s.is_assignable_to(db, union(db, [s, t])) && t.is_assignable_to(db, union(db, [s, t]))
);
// Equal element sets of intersections implies equivalence
// flaky at least in part because of https://github.com/astral-sh/ruff/issues/15513
type_property_test!(