File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -96,3 +96,7 @@ infix operator ..*..
96
96
class UsableFromInlineClass {
97
97
private var Prop = 1
98
98
}
99
+
100
+ class InternalType { }
101
+
102
+ extension InternalType { }
Original file line number Diff line number Diff line change
1
+ #include " llvm/ADT/STLExtras.h"
1
2
#include < ModuleAnalyzerNodes.h>
2
3
#include < algorithm>
3
4
@@ -1522,7 +1523,11 @@ void SwiftDeclCollector::lookupVisibleDecls(ArrayRef<ModuleDecl *> Modules) {
1522
1523
for (auto *D: KnownDecls) {
1523
1524
if (auto *Ext = dyn_cast<ExtensionDecl>(D)) {
1524
1525
if (HandledExtensions.find (Ext) == HandledExtensions.end ()) {
1525
- ExtensionMap[Ext->getExtendedNominal ()].push_back (Ext);
1526
+ auto *NTD = Ext->getExtendedNominal ();
1527
+ // Check if the extension is from other modules.
1528
+ if (!llvm::is_contained (Modules, NTD->getModuleContext ())) {
1529
+ ExtensionMap[NTD].push_back (Ext);
1530
+ }
1526
1531
}
1527
1532
}
1528
1533
}
You can’t perform that action at this time.
0 commit comments