mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #69950 from slavapestov/clean-up-open-existentials
Cleanups and fixes for opened existentials
This commit is contained in:
@@ -13014,19 +13014,6 @@ ConstraintSystem::SolutionKind ConstraintSystem::simplifyApplicableFnConstraint(
|
||||
result2, opened.second->getExistentialType(), opened.first,
|
||||
TypePosition::Covariant);
|
||||
}
|
||||
|
||||
// If result type has any erased existential types it requires explicit
|
||||
// `as` coercion.
|
||||
if (AddExplicitExistentialCoercion::isRequired(
|
||||
*this, func2->getResult(), openedExistentials, locator)) {
|
||||
|
||||
if (!shouldAttemptFixes())
|
||||
return SolutionKind::Error;
|
||||
|
||||
if (recordFix(AddExplicitExistentialCoercion::create(
|
||||
*this, result2, getConstraintLocator(locator))))
|
||||
return SolutionKind::Error;
|
||||
}
|
||||
}
|
||||
|
||||
// The result types are equivalent.
|
||||
|
||||
Reference in New Issue
Block a user