File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -700,18 +700,14 @@ bool ConstraintGraph::contractEdges() {
700
700
// being present in this case, so it can generate the appropriate lvalue
701
701
// wrapper for the argument type.
702
702
if (isParamBindingConstraint) {
703
- auto node = tyvar1->getImpl ().getGraphNode ();
704
- auto hasDependentConstraint = false ;
705
-
706
- for (auto t1Constraint : node->getConstraints ()) {
707
- if (isStrictInoutSubtypeConstraint (t1Constraint)) {
708
- hasDependentConstraint = true ;
709
- break ;
710
- }
711
- }
712
-
713
- if (hasDependentConstraint)
703
+ auto *node = tyvar1->getImpl ().getGraphNode ();
704
+ auto constraints = node->getConstraints ();
705
+ if (std::any_of (constraints.begin (), constraints.end (),
706
+ [](Constraint *constraint) {
707
+ return isStrictInoutSubtypeConstraint (constraint);
708
+ })) {
714
709
continue ;
710
+ }
715
711
}
716
712
717
713
auto rep1 = CS.getRepresentative (tyvar1);
You can’t perform that action at this time.
0 commit comments