Native: apply ObjCExport virtual adapters from interfaces of supers

Previously they were skipped, and this was an incorrect optimization:
even if super class implements the interface too, this doesn't mean
that virtual adapters provided by that interface are inherited
by non-exported subclass that needs them;
for example, this doesn't happen when the super class is exported
(i.e. Obj-C class is not created at runtime).

Remove incorrect optimization instead of making it more sophisticated,
because it is useless anyway.

^KT-46431 Fixed
This commit is contained in:
Svyatoslav Scherbina
2021-06-11 15:35:25 +03:00
committed by Space
parent b7fbe09ef4
commit 5d5628f56e
5 changed files with 82 additions and 4 deletions
@@ -673,6 +673,24 @@ __attribute__((swift_name("Kt43599Kt")))
@property (class, readonly) NSString *topLevelLateinitProperty __attribute__((swift_name("topLevelLateinitProperty")));
@end;
__attribute__((swift_name("Host")))
@protocol KtHost
@required
@property (readonly) NSString *test __attribute__((swift_name("test")));
@end;
__attribute__((swift_name("AbstractHost")))
@interface KtAbstractHost : KtBase <KtHost>
- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer));
+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead")));
@end;
__attribute__((objc_subclassing_restricted))
__attribute__((swift_name("Kt46431Kt")))
@interface KtKt46431Kt : KtBase
+ (id<KtHost>)createAbstractHost __attribute__((swift_name("createAbstractHost()")));
@end;
__attribute__((objc_subclassing_restricted))
__attribute__((swift_name("KT43780TestObject")))
@interface KtKT43780TestObject : KtBase