@@ -139,6 +139,12 @@ static auto PushOperand(Context& context, Worklist& worklist,
139139 for (auto interface : facet_type_info.self_impls_constraints ) {
140140 push_specific (interface.specific_id );
141141 }
142+ for (auto interface : facet_type_info.extend_named_constraints ) {
143+ push_specific (interface.specific_id );
144+ }
145+ for (auto interface : facet_type_info.self_impls_named_constraints ) {
146+ push_specific (interface.specific_id );
147+ }
142148 for (auto rewrite : facet_type_info.rewrite_constraints ) {
143149 worklist.Push (rewrite.lhs_id );
144150 worklist.Push (rewrite.rhs_id );
@@ -243,6 +249,26 @@ static auto PopOperand(Context& context, Worklist& worklist,
243249 auto lhs_id = worklist.Pop ();
244250 new_constraint = {.lhs_id = lhs_id, .rhs_id = rhs_id};
245251 }
252+ new_facet_type_info.self_impls_named_constraints .resize (
253+ old_facet_type_info.self_impls_named_constraints .size (),
254+ SemIR::SpecificNamedConstraint::None);
255+ for (auto [old_constraint, new_constraint] : llvm::reverse (
256+ llvm::zip (old_facet_type_info.self_impls_named_constraints ,
257+ new_facet_type_info.self_impls_named_constraints ))) {
258+ new_constraint = {
259+ .named_constraint_id = old_constraint.named_constraint_id ,
260+ .specific_id = pop_specific (old_constraint.specific_id )};
261+ }
262+ new_facet_type_info.extend_named_constraints .resize (
263+ old_facet_type_info.extend_named_constraints .size (),
264+ SemIR::SpecificNamedConstraint::None);
265+ for (auto [old_constraint, new_constraint] : llvm::reverse (
266+ llvm::zip (old_facet_type_info.extend_named_constraints ,
267+ new_facet_type_info.extend_named_constraints ))) {
268+ new_constraint = {
269+ .named_constraint_id = old_constraint.named_constraint_id ,
270+ .specific_id = pop_specific (old_constraint.specific_id )};
271+ }
246272 new_facet_type_info.self_impls_constraints .resize (
247273 old_facet_type_info.self_impls_constraints .size (),
248274 SemIR::SpecificInterface::None);
0 commit comments