Skip to content

Commit

Permalink
Fix binary incompatibility introduced in #4261 (#4310)
Browse files Browse the repository at this point in the history
Fixes #4309
  • Loading branch information
dkhalanskyjb authored Dec 20, 2024
1 parent 33b18cd commit 2a9b88c
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -963,6 +963,7 @@ final inline fun <#A: reified kotlin/Any?, #B: kotlin/Any?> kotlinx.coroutines.f
final inline fun <#A: reified kotlin/Any?> (kotlinx.coroutines.flow/Flow<*>).kotlinx.coroutines.flow/filterIsInstance(): kotlinx.coroutines.flow/Flow<#A> // kotlinx.coroutines.flow/filterIsInstance|[email protected]<*>(){0§<kotlin.Any?>}[0]
final inline fun kotlinx.coroutines.flow.internal/checkIndexOverflow(kotlin/Int): kotlin/Int // kotlinx.coroutines.flow.internal/checkIndexOverflow|checkIndexOverflow(kotlin.Int){}[0]
final inline fun kotlinx.coroutines/CoroutineExceptionHandler(crossinline kotlin/Function2<kotlin.coroutines/CoroutineContext, kotlin/Throwable, kotlin/Unit>): kotlinx.coroutines/CoroutineExceptionHandler // kotlinx.coroutines/CoroutineExceptionHandler|CoroutineExceptionHandler(kotlin.Function2<kotlin.coroutines.CoroutineContext,kotlin.Throwable,kotlin.Unit>){}[0]
final inline fun kotlinx.coroutines/Runnable(crossinline kotlin/Function0<kotlin/Unit>): kotlinx.coroutines/Runnable // kotlinx.coroutines/Runnable|Runnable(kotlin.Function0<kotlin.Unit>){}[0]
final suspend fun (kotlin.collections/Collection<kotlinx.coroutines/Job>).kotlinx.coroutines/joinAll() // kotlinx.coroutines/joinAll|[email protected]<kotlinx.coroutines.Job>(){}[0]
final suspend fun (kotlinx.coroutines.channels/ProducerScope<*>).kotlinx.coroutines.channels/awaitClose(kotlin/Function0<kotlin/Unit> = ...) // kotlinx.coroutines.channels/awaitClose|[email protected]<*>(kotlin.Function0<kotlin.Unit>){}[0]
final suspend fun (kotlinx.coroutines.flow/Flow<*>).kotlinx.coroutines.flow/collect() // kotlinx.coroutines.flow/collect|[email protected]<*>(){}[0]
Expand Down
11 changes: 11 additions & 0 deletions kotlinx-coroutines-core/jsAndWasmShared/src/Runnable.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,14 @@ public actual fun interface Runnable {
*/
public actual fun run()
}

@Deprecated(
"Preserved for binary compatibility, see https://github.com/Kotlin/kotlinx.coroutines/issues/4309",
level = DeprecationLevel.HIDDEN
)
public inline fun Runnable(crossinline block: () -> Unit): Runnable =
object : Runnable {
override fun run() {
block()
}
}
11 changes: 11 additions & 0 deletions kotlinx-coroutines-core/native/src/Runnable.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,14 @@ public actual fun interface Runnable {
*/
public actual fun run()
}

@Deprecated(
"Preserved for binary compatibility, see https://github.com/Kotlin/kotlinx.coroutines/issues/4309",
level = DeprecationLevel.HIDDEN
)
public inline fun Runnable(crossinline block: () -> Unit): Runnable =
object : Runnable {
override fun run() {
block()
}
}

0 comments on commit 2a9b88c

Please sign in to comment.