File tree Expand file tree Collapse file tree 3 files changed +27
-3
lines changed Expand file tree Collapse file tree 3 files changed +27
-3
lines changed Original file line number Diff line number Diff line change @@ -3470,14 +3470,14 @@ bool FileUnit::walk(ASTWalker &walker) {
3470
3470
if (SkipInternal) {
3471
3471
// Ignore if the decl isn't visible
3472
3472
if (auto *VD = dyn_cast<ValueDecl>(D)) {
3473
- if (! VD->isAccessibleFrom ( nullptr ) )
3473
+ if (VD->getFormalAccess () < AccessLevel::Public )
3474
3474
continue ;
3475
3475
}
3476
3476
3477
3477
// Also ignore if the extended nominal isn't visible
3478
3478
if (auto *ED = dyn_cast<ExtensionDecl>(D)) {
3479
3479
auto *ND = ED->getExtendedNominal ();
3480
- if (ND && ! ND->isAccessibleFrom ( nullptr ) )
3480
+ if (ND && ND->getFormalAccess () < AccessLevel::Public )
3481
3481
continue ;
3482
3482
}
3483
3483
}
Original file line number Diff line number Diff line change @@ -1008,7 +1008,7 @@ class IndexSwiftASTWalker : public SourceEntityWalker {
1008
1008
return false ;
1009
1009
1010
1010
// Do not handle non-public imported decls.
1011
- if (IsModuleFile && ! D->isAccessibleFrom ( nullptr ) )
1011
+ if (IsModuleFile && D->getFormalAccess () < AccessLevel::Public )
1012
1012
return false ;
1013
1013
1014
1014
if (!IdxConsumer.indexLocals () && isLocalSymbol (D))
Original file line number Diff line number Diff line change
1
+ // REQUIRES: objc_interop
2
+
3
+ // RUN: %empty-directory(%t)
4
+ // RUN: %empty-directory(%t/mods)
5
+ // RUN: split-file %s %t
6
+
7
+ // RUN: %target-swift-frontend -emit-module -o %t/mods %t/ObjcImpl.swift -import-objc-header %t/objc_impl.h -disable-objc-attr-requires-foundation-module
8
+ // RUN: %target-swift-ide-test -print-indexed-symbols -module-to-print ObjcImpl -source-filename none -I %t/mods | %FileCheck %s
9
+
10
+ //--- objc_impl.h
11
+ @interface NSObject
12
+ @end
13
+
14
+ @interface ObjCClass : NSObject
15
+ @property int someObjCDeclaredVar;
16
+ @end
17
+
18
+ //--- ObjcImpl.swift
19
+ // CHECK: extension/ext-class/Swift | ObjCClass | s:e:c:@CM@ObjcImpl@@objc(cs)ObjCClass(py)someObjCDeclaredVar | Def
20
+ // CHECK: class/Swift | ObjCClass | c:objc(cs)ObjCClass | Ref
21
+ @_objcImplementation public extension ObjCClass {
22
+ // CHECK: instance-property/Swift | someObjCDeclaredVar | c:@CM@ObjcImpl@@objc(cs)ObjCClass(py)someObjCDeclaredVar | Def
23
+ @objc var someObjCDeclaredVar : CInt
24
+ }
You can’t perform that action at this time.
0 commit comments