Skip to content

Commit 4c0f49f

Browse files
committed
[ConstraintSystem] Remove selectApplyDisjunction, which was only used
by the operator designated types implementation.
1 parent 1e0038c commit 4c0f49f

File tree

2 files changed

+0
-26
lines changed

2 files changed

+0
-26
lines changed

include/swift/Sema/ConstraintSystem.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5032,8 +5032,6 @@ class ConstraintSystem {
50325032
/// \returns The selected disjunction.
50335033
Constraint *selectDisjunction();
50345034

5035-
Constraint *selectApplyDisjunction();
5036-
50375035
/// Solve the system of constraints generated from provided expression.
50385036
///
50395037
/// \param target The target to generate constraints from.

lib/Sema/CSSolver.cpp

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1929,30 +1929,6 @@ Constraint *ConstraintSystem::getUnboundBindOverloadDisjunction(
19291929
return result->first;
19301930
}
19311931

1932-
// Find a disjunction associated with an ApplicableFunction constraint
1933-
// where we have some information about all of the types of in the
1934-
// function application (even if we only know something about what the
1935-
// types conform to and not actually a concrete type).
1936-
Constraint *ConstraintSystem::selectApplyDisjunction() {
1937-
for (auto &constraint : InactiveConstraints) {
1938-
if (constraint.getKind() != ConstraintKind::ApplicableFunction)
1939-
continue;
1940-
1941-
auto *applicable = &constraint;
1942-
if (haveTypeInformationForAllArguments(
1943-
applicable->getFirstType()->castTo<FunctionType>())) {
1944-
auto *tyvar = applicable->getSecondType()->castTo<TypeVariableType>();
1945-
1946-
// If we have created the disjunction for this apply, find it.
1947-
auto *disjunction = getUnboundBindOverloadDisjunction(tyvar);
1948-
if (disjunction)
1949-
return disjunction;
1950-
}
1951-
}
1952-
1953-
return nullptr;
1954-
}
1955-
19561932
static bool isOperatorBindOverload(Constraint *bindOverload) {
19571933
if (bindOverload->getKind() != ConstraintKind::BindOverload)
19581934
return false;

0 commit comments

Comments
 (0)