Skip to content

Commit 4443966

Browse files
[CSDiagnostics] Removing duplicated diagnose for InstanceType
1 parent 0238a29 commit 4443966

File tree

2 files changed

+0
-19
lines changed

2 files changed

+0
-19
lines changed

lib/Sema/CSDiag.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1877,18 +1877,6 @@ bool FailureDiagnosis::visitApplyExpr(ApplyExpr *callExpr) {
18771877
return true;
18781878
}
18791879

1880-
<<<<<<< HEAD
1881-
bool FailureDiagnosis::visitCoerceExpr(CoerceExpr *CE) {
1882-
// Coerce the input to whatever type is specified by the CoerceExpr.
1883-
auto expr = typeCheckChildIndependently(CE->getSubExpr(),
1884-
CS.getType(CE->getCastTypeLoc()),
1885-
CTP_CoerceOperand);
1886-
if (!expr)
1887-
return true;
1888-
1889-
return false;
1890-
}
1891-
18921880
bool FailureDiagnosis::
18931881
visitRebindSelfInConstructorExpr(RebindSelfInConstructorExpr *E) {
18941882
// Don't walk the children for this node, it leads to multiple diagnostics

lib/Sema/CSDiagnostics.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4779,13 +4779,6 @@ bool MissingContextualConformanceFailure::diagnoseAsError() {
47794779
break;
47804780
}
47814781

4782-
case ConstraintLocator::InstanceType: {
4783-
// If the missing conformance involves a coercion of metatypes
4784-
if (diagnoseCoercionToUnrelatedType())
4785-
return true;
4786-
break;
4787-
}
4788-
47894782
default:
47904783
break;
47914784
}

0 commit comments

Comments
 (0)