markizdeviler
09/13/2024, 3:34 PMexpect interface TestCallback
// iosMain
@OptIn(ExperimentalForeignApi::class)
actual typealias TestCallback = TestDelegateProtocol
There is a problem if I use TestCallback in commonMain package, it says: error: This declaration needs opt-in. Its usage must be marked with '@kotlinx.cinterop.ExperimentalForeignApi' or '@OptIn(kotlinx.cinterop.ExperimentalForeignApi::class)'
At first, for @OptIn annotated types (classes, properties...), Its usages are not required to opt into that API (ExperimentalForeignApi)
The second ExperimentalForeignApi is platform-specific, which means I can't use it on commonMain package.
Does anybody have this kind of problem?markizdeviler
09/16/2024, 9:09 AMinterface TestDelegateProtocolProvider {
@OptIn(ExperimentalForeignApi::class)
fun provide(): TestDelegateProtocol
}