Skip to content

Commit cd472fe

Browse files
committed
Revert "[TypeChecker] TypeChecker::isSubtypeOf should recognize Sendable subtyping"
This reverts commit 359ea14.
1 parent a1d04e6 commit cd472fe

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lib/Sema/TypeCheckConstraints.cpp

+1-5
Original file line numberDiff line numberDiff line change
@@ -1068,17 +1068,13 @@ bool TypeChecker::typesSatisfyConstraint(Type type1, Type type2,
10681068
}
10691069

10701070
if (auto solution = cs.solveSingle()) {
1071-
const auto &score = solution->getFixedScore();
10721071
if (unwrappedIUO)
1073-
*unwrappedIUO = score.Data[SK_ForceUnchecked] > 0;
1072+
*unwrappedIUO = solution->getFixedScore().Data[SK_ForceUnchecked] > 0;
10741073

10751074
// Make sure that Sendable vs. no-Sendable mismatches are
10761075
// failures here to establish subtyping relationship
10771076
// (unlike in the solver where they are warnings until Swift 6).
10781077
if (kind == ConstraintKind::Subtype) {
1079-
if (score.Data[SK_MissingSynthesizableConformance] > 0)
1080-
return false;
1081-
10821078
if (llvm::any_of(solution->Fixes, [](const auto *fix) {
10831079
return fix->getKind() == FixKind::AddSendableAttribute;
10841080
}))

0 commit comments

Comments
 (0)