152aa24c53
To keep the tests closer to 'real life'/'production.' KT-65670
50 lines
1.7 KiB
Objective-C
Vendored
50 lines
1.7 KiB
Objective-C
Vendored
#import <Foundation/NSArray.h>
|
|
#import <Foundation/NSDictionary.h>
|
|
#import <Foundation/NSError.h>
|
|
#import <Foundation/NSObject.h>
|
|
#import <Foundation/NSSet.h>
|
|
#import <Foundation/NSString.h>
|
|
#import <Foundation/NSValue.h>
|
|
|
|
@class KotlinArray<T>;
|
|
|
|
@protocol KotlinIterator;
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
#pragma clang diagnostic push
|
|
#pragma clang diagnostic ignored "-Wunknown-warning-option"
|
|
#pragma clang diagnostic ignored "-Wincompatible-property-type"
|
|
#pragma clang diagnostic ignored "-Wnullability"
|
|
|
|
#pragma push_macro("_Nullable_result")
|
|
#if !__has_feature(nullability_nullable_result)
|
|
#undef _Nullable_result
|
|
#define _Nullable_result _Nullable
|
|
#endif
|
|
|
|
__attribute__((objc_subclassing_restricted))
|
|
@interface FooKt : Base
|
|
@property (class, readonly) KotlinArray<Int *> *a __attribute__((swift_name("a")));
|
|
@end
|
|
|
|
__attribute__((objc_subclassing_restricted))
|
|
@interface KotlinArray<T> : Base
|
|
+ (instancetype)arrayWithSize:(int32_t)size init:(T _Nullable (^)(Int *))init __attribute__((swift_name("init(size:init:)")));
|
|
+ (instancetype)alloc __attribute__((unavailable));
|
|
+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable));
|
|
- (T _Nullable)getIndex:(int32_t)index __attribute__((swift_name("get(index:)")));
|
|
- (id<KotlinIterator>)iterator __attribute__((swift_name("iterator()")));
|
|
- (void)setIndex:(int32_t)index value:(T _Nullable)value __attribute__((swift_name("set(index:value:)")));
|
|
@property (readonly) int32_t size __attribute__((swift_name("size")));
|
|
@end
|
|
|
|
@protocol KotlinIterator
|
|
@required
|
|
- (BOOL)hasNext __attribute__((swift_name("hasNext()")));
|
|
- (id _Nullable)next __attribute__((swift_name("next()")));
|
|
@end
|
|
|
|
#pragma pop_macro("_Nullable_result")
|
|
#pragma clang diagnostic pop
|
|
NS_ASSUME_NONNULL_END
|