mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[CSDiagnostics] Adjust diagnostics to account that type holes in solution are UnresolvedType
This commit is contained in:
@@ -5057,7 +5057,7 @@ bool CollectionElementContextualFailure::diagnoseAsError() {
|
||||
// holes present in the contextual type.
|
||||
if (FailureDiagnostic::getContextualTypePurpose(getAnchor()) ==
|
||||
ContextualTypePurpose::CTP_ForEachStmt &&
|
||||
contextualType->hasHole()) {
|
||||
contextualType->hasUnresolvedType()) {
|
||||
diagnostic.emplace(emitDiagnostic(
|
||||
(contextualType->is<TupleType>() && !eltType->is<TupleType>())
|
||||
? diag::cannot_match_expr_tuple_pattern_with_nontuple_value
|
||||
@@ -6315,7 +6315,7 @@ bool UnableToInferClosureParameterType::diagnoseAsError() {
|
||||
if (parentExpr) {
|
||||
// Missing or invalid member reference in call.
|
||||
if (auto *AE = dyn_cast<ApplyExpr>(parentExpr)) {
|
||||
if (getType(AE->getFn())->isHole())
|
||||
if (getType(AE->getFn())->is<UnresolvedType>())
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user