swift-module-digester: removing setter from a property is API breaking.

This commit is contained in:
Xi Ge
2018-09-21 18:25:12 -07:00
parent 15377ecac7
commit f72620c3b7
9 changed files with 43 additions and 3 deletions

View File

@@ -886,10 +886,16 @@ public:
}
case SDKNodeKind::DeclVar: {
auto LC = Left->getChildren()[0];
auto RC = Right->getChildren()[0];
auto LVar = cast<SDKNodeDeclVar>(Left);
auto RVar = cast<SDKNodeDeclVar>(Right);
auto LC = LVar->getType();
auto RC = RVar->getType();
if (!(*LC == *RC))
foundMatch(LC, RC, NodeMatchReason::Sequential);
if (LVar->getSetter() && !RVar->getSetter()) {
Ctx.getDiags().diagnose(SourceLoc(), diag::removed_setter,
LVar->getScreenInfo());
}
break;
}
}