[CS] Visit all fixed bindings for constraint re-activation (#30886)

[CS] Visit all fixed bindings for constraint re-activation
This commit is contained in:
Hamish Knight
2020-04-10 12:27:47 -07:00
committed by GitHub
16 changed files with 524 additions and 439 deletions

View File

@@ -6199,3 +6199,11 @@ bool MissingQuialifierInMemberRefFailure::diagnoseAsError() {
emitDiagnostic(choice, diag::decl_declared_here, choice->getFullName());
return true;
}
bool CoercionAsForceCastFailure::diagnoseAsError() {
auto *coercion = cast<CoerceExpr>(getRawAnchor());
emitDiagnostic(coercion->getLoc(), diag::coercion_may_fail_warning,
getFromType(), getToType())
.highlight(coercion->getSourceRange());
return true;
}