swift-module-digester: don't diagnose new protocol requirements if they're inherited.

This commit is contained in:
Xi Ge
2018-09-25 11:12:13 -07:00
parent c0556cc4dd
commit e1f4eecadb
4 changed files with 7 additions and 18 deletions

View File

@@ -842,7 +842,7 @@ public:
// Complain about added protocol requirements
if (auto *D = dyn_cast<SDKNodeDecl>(Right)) {
if (D->isProtocolRequirement()) {
bool ShouldComplain = true;
bool ShouldComplain = !D->isOverriding();
// We should allow added associated types with default.
if (auto ATD = dyn_cast<SDKNodeDeclAssociatedType>(D)) {
if (ATD->getDefault())