Skip to content

Commit c352ba0

Browse files
committed
OptIn to internal coroutines API
Kotlin/kotlinx.coroutines#3078
1 parent c7db33c commit c352ba0

File tree

1 file changed

+2
-0
lines changed
  • kmp-nativecoroutines-core/src/appleMain/kotlin/com/rickclephas/kmp/nativecoroutines

1 file changed

+2
-0
lines changed

kmp-nativecoroutines-core/src/appleMain/kotlin/com/rickclephas/kmp/nativecoroutines/NativeFlow.kt

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package com.rickclephas.kmp.nativecoroutines
22

33
import kotlinx.coroutines.CancellationException
44
import kotlinx.coroutines.CoroutineScope
5+
import kotlinx.coroutines.InternalCoroutinesApi
56
import kotlinx.coroutines.flow.Flow
67
import kotlinx.coroutines.flow.collect
78
import kotlinx.coroutines.launch
@@ -22,6 +23,7 @@ typealias NativeFlow<T> = (onItem: NativeCallback<T>, onComplete: NativeCallback
2223
* @receiver the [Flow] to collect.
2324
* @see Flow.collect
2425
*/
26+
@OptIn(InternalCoroutinesApi::class)
2527
fun <T> Flow<T>.asNativeFlow(scope: CoroutineScope? = null): NativeFlow<T> {
2628
val coroutineScope = scope ?: defaultCoroutineScope
2729
return (collect@{ onItem: NativeCallback<T>, onComplete: NativeCallback<NSError?> ->

0 commit comments

Comments
 (0)