[Sema] Generalize the 'declared here' diagnostic

This commit is contained in:
fischertony
2018-05-22 18:17:15 +03:00
parent 3d1bfcb8d1
commit 7313a90eb1
11 changed files with 66 additions and 62 deletions

View File

@@ -1738,11 +1738,9 @@ void swift::maybeAddAccessorsToVariable(VarDecl *var, TypeChecker &TC) {
TC.diagnose(behavior->getLoc(),
diag::property_behavior_protocol_reqt_ambiguous,
TC.Context.Id_value);
TC.diagnose(valueProp->getLoc(),
diag::property_behavior_protocol_reqt_here,
TC.diagnose(valueProp->getLoc(), diag::identifier_declared_here,
TC.Context.Id_value);
TC.diagnose(foundVar->getLoc(),
diag::property_behavior_protocol_reqt_here,
TC.diagnose(foundVar->getLoc(), diag::identifier_declared_here,
TC.Context.Id_value);
break;
}