File tree Expand file tree Collapse file tree 3 files changed +24
-0
lines changed
Inputs/clang-importer-sdk/usr/include/objc Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -3787,6 +3787,17 @@ ClangImporter::Implementation::loadNamedMembers(
3787
3787
Members.push_back (V);
3788
3788
}
3789
3789
}
3790
+
3791
+ // If the property's accessors have alternate decls, we might have
3792
+ // to import those too.
3793
+ if (auto *ASD = dyn_cast<AbstractStorageDecl>(TD)) {
3794
+ for (auto *AD : ASD->getAllAccessors ()) {
3795
+ for (auto *D : getAlternateDecls (AD)) {
3796
+ if (D->getBaseName () == N)
3797
+ Members.push_back (D);
3798
+ }
3799
+ }
3800
+ }
3790
3801
}
3791
3802
}
3792
3803
Original file line number Diff line number Diff line change
1
+ // RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-sil %s -verify
2
+ // REQUIRES: objc_interop
3
+
4
+ import Foundation
5
+
6
+ func mirrorInstancePropertyAsStaticMethod( ) {
7
+ // Instance properties are mirrored as static _methods_. Make sure this works.
8
+ let _: AnyClass = NSObject . classForCoder ( )
9
+ }
Original file line number Diff line number Diff line change 27
27
@property (readonly ) NSInteger hash;
28
28
@end
29
29
30
+ @interface NSObject (Coding)
31
+ - (Class )classForCoder ;
32
+ @end
33
+
30
34
@interface A : NSObject
31
35
- (int )method : (int )arg withDouble : (double )d ;
32
36
+ (int )classMethod ;
You can’t perform that action at this time.
0 commit comments