@@ -2178,7 +2178,6 @@ ConstraintSystem::matchTupleTypes(TupleType *tuple1, TupleType *tuple2,
2178
2178
case ConstraintKind::ValueMember:
2179
2179
case ConstraintKind::ValueWitness:
2180
2180
case ConstraintKind::BridgingConversion:
2181
- case ConstraintKind::OneWayEqual:
2182
2181
case ConstraintKind::FallbackType:
2183
2182
case ConstraintKind::UnresolvedMemberChainBase:
2184
2183
case ConstraintKind::PropertyWrapper:
@@ -2549,7 +2548,6 @@ static bool matchFunctionRepresentations(FunctionType::ExtInfo einfo1,
2549
2548
case ConstraintKind::UnresolvedValueMember:
2550
2549
case ConstraintKind::ValueMember:
2551
2550
case ConstraintKind::ValueWitness:
2552
- case ConstraintKind::OneWayEqual:
2553
2551
case ConstraintKind::FallbackType:
2554
2552
case ConstraintKind::UnresolvedMemberChainBase:
2555
2553
case ConstraintKind::PropertyWrapper:
@@ -3193,7 +3191,6 @@ ConstraintSystem::matchFunctionTypes(FunctionType *func1, FunctionType *func2,
3193
3191
case ConstraintKind::ValueMember:
3194
3192
case ConstraintKind::ValueWitness:
3195
3193
case ConstraintKind::BridgingConversion:
3196
- case ConstraintKind::OneWayEqual:
3197
3194
case ConstraintKind::FallbackType:
3198
3195
case ConstraintKind::UnresolvedMemberChainBase:
3199
3196
case ConstraintKind::PropertyWrapper:
@@ -7128,7 +7125,6 @@ ConstraintSystem::matchTypes(Type type1, Type type2, ConstraintKind kind,
7128
7125
case ConstraintKind::UnresolvedValueMember:
7129
7126
case ConstraintKind::ValueMember:
7130
7127
case ConstraintKind::ValueWitness:
7131
- case ConstraintKind::OneWayEqual:
7132
7128
case ConstraintKind::FallbackType:
7133
7129
case ConstraintKind::UnresolvedMemberChainBase:
7134
7130
case ConstraintKind::PropertyWrapper:
@@ -11561,38 +11557,6 @@ ConstraintSystem::simplifyPropertyWrapperConstraint(
11561
11557
return SolutionKind::Solved;
11562
11558
}
11563
11559
11564
- ConstraintSystem::SolutionKind
11565
- ConstraintSystem::simplifyOneWayConstraint(
11566
- ConstraintKind kind,
11567
- Type first, Type second, TypeMatchOptions flags,
11568
- ConstraintLocatorBuilder locator) {
11569
- // Determine whether the second type can be fully simplified. Only then
11570
- // will this constraint be resolved.
11571
- Type secondSimplified = simplifyType(second);
11572
- if (secondSimplified->hasTypeVariable()) {
11573
- if (flags.contains(TMF_GenerateConstraints)) {
11574
- addUnsolvedConstraint(
11575
- Constraint::create(*this, kind, first, second,
11576
- getConstraintLocator(locator)));
11577
- return SolutionKind::Solved;
11578
- }
11579
-
11580
- return SolutionKind::Unsolved;
11581
- }
11582
-
11583
- // Propagate holes through one-way constraints.
11584
- if (secondSimplified->isPlaceholder()) {
11585
- recordAnyTypeVarAsPotentialHole(first);
11586
- return SolutionKind::Solved;
11587
- }
11588
-
11589
- // Translate this constraint into an equality or bind-parameter constraint,
11590
- // as appropriate.
11591
- ASSERT(kind == ConstraintKind::OneWayEqual);
11592
- return matchTypes(first, secondSimplified, ConstraintKind::Equal, flags,
11593
- locator);
11594
- }
11595
-
11596
11560
ConstraintSystem::SolutionKind
11597
11561
ConstraintSystem::simplifyUnresolvedMemberChainBaseConstraint(
11598
11562
Type first, Type second, TypeMatchOptions flags,
@@ -15724,9 +15688,6 @@ ConstraintSystem::addConstraintImpl(ConstraintKind kind, Type first,
15724
15688
case ConstraintKind::PropertyWrapper:
15725
15689
return simplifyPropertyWrapperConstraint(first, second, subflags, locator);
15726
15690
15727
- case ConstraintKind::OneWayEqual:
15728
- return simplifyOneWayConstraint(kind, first, second, subflags, locator);
15729
-
15730
15691
case ConstraintKind::UnresolvedMemberChainBase:
15731
15692
return simplifyUnresolvedMemberChainBaseConstraint(first, second, subflags,
15732
15693
locator);
@@ -16304,12 +16265,6 @@ ConstraintSystem::simplifyConstraint(const Constraint &constraint) {
16304
16265
// See {Dis, Con}junctionStep class in CSStep.cpp for solving
16305
16266
return SolutionKind::Unsolved;
16306
16267
16307
- case ConstraintKind::OneWayEqual:
16308
- return simplifyOneWayConstraint(
16309
- constraint.getKind(), constraint.getFirstType(),
16310
- constraint.getSecondType(),
16311
- /*flags*/ std::nullopt, constraint.getLocator());
16312
-
16313
16268
case ConstraintKind::UnresolvedMemberChainBase:
16314
16269
return simplifyUnresolvedMemberChainBaseConstraint(
16315
16270
constraint.getFirstType(), constraint.getSecondType(),
0 commit comments