place bounds/constraints first

This commit is contained in:
Douglas Creager 2025-12-15 09:15:22 -05:00
parent 88eb5eba22
commit 7f4893d200
1 changed files with 3 additions and 2 deletions

View File

@ -3671,9 +3671,10 @@ impl<'db> GenericContext<'db> {
// each typevar. // each typevar.
let abstracted = self let abstracted = self
.variables(db) .variables(db)
.fold(constraints.node, |constraints, bound_typevar| { .fold(Node::AlwaysTrue, |constraints, bound_typevar| {
constraints.and_with_offset(db, bound_typevar.valid_specializations(db)) constraints.and_with_offset(db, bound_typevar.valid_specializations(db))
}); })
.and_with_offset(db, constraints.node);
tracing::debug!( tracing::debug!(
target: "ty_python_semantic::types::constraints::specialize_constrained", target: "ty_python_semantic::types::constraints::specialize_constrained",
valid = %abstracted.display(db), valid = %abstracted.display(db),