mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #77652 from xedin/issue-77644
[CSSimplify] Handle invalid type specializations
This commit is contained in:
@@ -13935,6 +13935,13 @@ ConstraintSystem::simplifyExplicitGenericArgumentsConstraint(
|
||||
} else {
|
||||
// If the overload hasn't been resolved, we can't simplify this constraint.
|
||||
auto overloadLocator = getCalleeLocator(getConstraintLocator(locator));
|
||||
|
||||
// If there was a problem resolving specialization expression
|
||||
// it would be diagnosted as invalid AST node.
|
||||
if (overloadLocator->directlyAt<ErrorExpr>()) {
|
||||
return shouldAttemptFixes() ? SolutionKind::Error : SolutionKind::Solved;
|
||||
}
|
||||
|
||||
auto selectedOverload = findSelectedOverloadFor(overloadLocator);
|
||||
if (!selectedOverload)
|
||||
return formUnsolved();
|
||||
|
||||
Reference in New Issue
Block a user