mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
swift-module-digester: removing setter from a property is API breaking.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user