[CS] Diagnose UnresolvedPatternExprs as part of constraint solving

Instead of diagnosing in CSApply, let's create a
fix and diagnose in the solver instead.
Additionally, make sure we assign ErrorTypes to
any VarDecls bound by the invalid pattern, which
fixes a crash.

rdar://110638279
This commit is contained in:
Hamish Knight
2023-06-13 12:14:25 +01:00
parent 762cd4d10e
commit c6dd3ad839
10 changed files with 118 additions and 29 deletions

View File

@@ -14871,6 +14871,7 @@ ConstraintSystem::SolutionKind ConstraintSystem::simplifyFixConstraint(
case FixKind::AddExplicitExistentialCoercion:
case FixKind::DestructureTupleToMatchPackExpansionParameter:
case FixKind::AllowValueExpansionWithoutPackReferences:
case FixKind::IgnoreInvalidPatternInExpr:
case FixKind::IgnoreMissingEachKeyword:
llvm_unreachable("handled elsewhere");
}