Description
CBLArray, CBLMutableArray, CBLDictionary, etc are failing on Xcode 12
Protocols and class defined in ObjC
@protocol Model <NSObject>
|
- (NSInteger) objectAtIndexedSubscript: (NSUInteger)index;
|
- (void) functionality;
|
@end
|
|
@interface ModelObject : NSObject <Model>
|
// This will avoid the error::
|
// - (NSInteger) objectAtIndexedSubscript: (NSUInteger)index
|
@end
|
|
@implementation ModelObject
|
- (NSInteger) objectAtIndexedSubscript: (NSUInteger)index {
|
return 0;
|
}
|
|
- (void) functionality {
|
NSLog(@"called functionality");
|
}
|
@end
|
Calling from Swift
class SwiftModel {
|
func someFunction(obj: ModelObject) {
|
// works fine
|
obj.functionality()
|
|
// error: Value of type 'ModelObject' has no subscripts
|
print(obj[0])
|
}
|
}
|
Attachments
Issue Links
- relates to
-
CBL-1100 Sprint-24 20%
- Closed