mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Diagnostics: Ported tuple mismatch diagnostic to new diagnostic framework
This commit is contained in:
@@ -229,6 +229,18 @@ ContextualMismatch *ContextualMismatch::create(ConstraintSystem &cs, Type lhs,
|
||||
return new (cs.getAllocator()) ContextualMismatch(cs, lhs, rhs, locator);
|
||||
}
|
||||
|
||||
bool AllowTupleTypeMismatch::diagnose(Expr *root, bool asNote) const {
|
||||
auto failure = TupleContextualFailure(root, getConstraintSystem(), LHS, RHS,
|
||||
getLocator());
|
||||
return failure.diagnose(asNote);
|
||||
}
|
||||
|
||||
AllowTupleTypeMismatch *
|
||||
AllowTupleTypeMismatch::create(ConstraintSystem &cs, Type lhs, Type rhs,
|
||||
ConstraintLocator *locator) {
|
||||
return new (cs.getAllocator()) AllowTupleTypeMismatch(cs, lhs, rhs, locator);
|
||||
}
|
||||
|
||||
bool GenericArgumentsMismatch::diagnose(Expr *root, bool asNote) const {
|
||||
auto failure = GenericArgumentsMismatchFailure(root, getConstraintSystem(),
|
||||
getActual(), getRequired(),
|
||||
|
||||
Reference in New Issue
Block a user