mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[ConstraintSystem] Specialize diagnostic for ~= to talk about expression pattern use
This commit is contained in:
@@ -2814,6 +2814,9 @@ static void diagnoseOperatorAmbiguity(ConstraintSystem &cs,
|
||||
operatorName.str());
|
||||
return;
|
||||
}
|
||||
} else if (operatorName.is("~=")) {
|
||||
DE.diagnose(anchor->getLoc(), diag::cannot_match_expr_pattern_with_value,
|
||||
lhsType, rhsType);
|
||||
} else {
|
||||
DE.diagnose(anchor->getLoc(), diag::cannot_apply_binop_to_args,
|
||||
operatorName.str(), lhsType, rhsType)
|
||||
|
||||
Reference in New Issue
Block a user