mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
swift-module-digester: fix a false positive when diagnosing super class changes.
This commit is contained in:
@@ -710,9 +710,7 @@ static void diagnoseNominalTypeDeclChange(SDKNodeDeclType *L, SDKNodeDeclType *R
|
||||
if (RSuperClass.empty()) {
|
||||
Diags.diagnose(SourceLoc(), diag::super_class_removed, L->getScreenInfo(),
|
||||
LSuperClass);
|
||||
} else {
|
||||
// FIXME: This will be a false positive if the new subclass is a subclass
|
||||
// of the old type.
|
||||
} else if (!contains(R->getClassInheritanceChain(), LSuperClass)) {
|
||||
Diags.diagnose(SourceLoc(), diag::super_class_changed, L->getScreenInfo(),
|
||||
LSuperClass, RSuperClass);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user