mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
swift-module-digester: diagnose removing default associated type as API breakage.
This commit is contained in:
@@ -817,6 +817,13 @@ public:
|
||||
case NodeMatchReason::Removed:
|
||||
assert(!Right);
|
||||
Left->annotate(NodeAnnotation::Removed);
|
||||
if (auto *LT = dyn_cast<SDKNodeType>(Left)) {
|
||||
if (auto *AT = dyn_cast<SDKNodeDeclAssociatedType>(LT->getParent())) {
|
||||
Ctx.getDiags().diagnose(SourceLoc(),
|
||||
diag::default_associated_type_removed,
|
||||
AT->getScreenInfo(), LT->getPrintedName());
|
||||
}
|
||||
}
|
||||
return;
|
||||
case NodeMatchReason::FuncToProperty:
|
||||
case NodeMatchReason::ModernizeEnum:
|
||||
|
||||
Reference in New Issue
Block a user