Charles Jo
02/07/2024, 4:46 PMInternal error occurred while analyzing this expression: InvalidCardinalityException: Container: LocalClassifierAnalyzer: Request interface org.jetbrains.kotlin.builtins.PlatformSpecificCastChecker cannot be satisfied because there is more than one type registered Clashed registrations: Instance: NativePlatformSpecificCastChecker, Instance: NativePlatformSpecificCastChecker, Instance: NativePlatformSpecificCastChecker
This is exmaple delegate definition in Objective-C header file
@protocol TestDelegate NSObject
@required
- (void) onTest:(Test *)testObj scanData:(NSString *)scanData;
@end
And converted Kotlin binding code is like this
@kotlinx.cinterop.ExperimentalForeignApi public expect interface TestDelegateProtocol : platform.darwin.NSObjectProtocol {
@kotlin.commonizer.ObjCCallable public abstract expect fun onTest(testObj: com.example.proj.Test?, scanData: kotlin.String?): kotlin.Unit
}Michael Krussel
02/07/2024, 6:23 PMCharles Jo
02/07/2024, 6:26 PMCharles Jo
02/07/2024, 6:26 PMMichael Krussel
02/07/2024, 6:37 PMclass MyTestDelegate : NSObject(), TestDelegateProtocol {}
Charles Jo
02/07/2024, 6:54 PM