Skip to content

Commit 7eb623d

Browse files
committed
[ConstraintSystem] Marking closure parameter as potentially incomplete is not longer necessary
Since closure body isn't opened until its contextual type is resolved there is no need to explicitly delay attempting bindings for closure parameter used in the body anymore.
1 parent 6a7cc79 commit 7eb623d

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

lib/Sema/CSBindings.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -972,20 +972,6 @@ bool ConstraintSystem::PotentialBindings::infer(
972972
case ConstraintKind::ArgumentConversion:
973973
case ConstraintKind::OperatorArgumentConversion:
974974
case ConstraintKind::OptionalObject: {
975-
// If there is a `bind param` constraint associated with
976-
// current type variable, result should be aware of that
977-
// fact. Binding set might be incomplete until
978-
// this constraint is resolved, because we currently don't
979-
// look-through constraints expect to `subtype` to try and
980-
// find related bindings.
981-
// This only affects type variable that appears one the
982-
// right-hand side of the `bind param` constraint and
983-
// represents result type of the closure body, because
984-
// left-hand side gets types from overload choices.
985-
if (constraint->getKind() == ConstraintKind::BindParam &&
986-
constraint->getSecondType()->isEqual(TypeVar))
987-
PotentiallyIncomplete = true;
988-
989975
auto binding =
990976
cs.getPotentialBindingForRelationalConstraint(*this, constraint);
991977
if (!binding)

0 commit comments

Comments
 (0)