[ConstraintSystem] Intoduce a fix for incorrect use of trailing closures

This commit is contained in:
Pavel Yaskevich
2019-10-31 20:57:09 -07:00
parent 6bddac33d5
commit d87d22d336
2 changed files with 32 additions and 0 deletions

View File

@@ -994,3 +994,15 @@ RemoveInvalidCall *RemoveInvalidCall::create(ConstraintSystem &cs,
ConstraintLocator *locator) {
return new (cs.getAllocator()) RemoveInvalidCall(cs, locator);
}
bool AllowInvalidUseOfTrailingClosure::diagnose(Expr *expr, bool asNote) const {
return false;
}
AllowInvalidUseOfTrailingClosure *
AllowInvalidUseOfTrailingClosure::create(ConstraintSystem &cs, Type argType,
Type paramType,
ConstraintLocator *locator) {
return new (cs.getAllocator())
AllowInvalidUseOfTrailingClosure(cs, argType, paramType, locator);
}