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(
37873787 Members.push_back (V);
37883788 }
37893789 }
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+ }
37903801 }
37913802 }
37923803
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 2727@property (readonly ) NSInteger hash;
2828@end
2929
30+ @interface NSObject (Coding)
31+ - (Class )classForCoder ;
32+ @end
33+
3034@interface A : NSObject
3135- (int )method : (int )arg withDouble : (double )d ;
3236+ (int )classMethod ;
You can’t perform that action at this time.
0 commit comments