Skip to content

Commit fa218c6

Browse files
authored
Fix ABSTRACT_MEMBER_NOT_IMPLEMENTED compilation with newer Kotlin (#3805)
The compilation started failing after KT-59739
1 parent 5b64a1f commit fa218c6

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

kotlinx-coroutines-core/common/src/flow/internal/SafeCollector.common.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ internal expect class SafeCollector<T>(
1818
internal val collectContext: CoroutineContext
1919
internal val collectContextSize: Int
2020
public fun releaseIntercepted()
21+
public override suspend fun emit(value: T)
2122
}
2223

2324
@JvmName("checkContext") // For prettier stack traces

kotlinx-coroutines-core/js/src/flow/internal/SafeCollector.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ internal actual class SafeCollector<T> actual constructor(
1717
internal actual val collectContextSize = collectContext.fold(0) { count, _ -> count + 1 }
1818
private var lastEmissionContext: CoroutineContext? = null
1919

20-
override suspend fun emit(value: T) {
20+
actual override suspend fun emit(value: T) {
2121
val currentContext = currentCoroutineContext()
2222
currentContext.ensureActive()
2323
if (lastEmissionContext !== currentContext) {

kotlinx-coroutines-core/jvm/src/flow/internal/SafeCollector.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ internal actual class SafeCollector<T> actual constructor(
6060
* then just cache an instance of the completion in order to avoid extra allocation on each emit,
6161
* making it effectively garbage-free on its hot-path.
6262
*/
63-
override suspend fun emit(value: T) {
63+
actual override suspend fun emit(value: T) {
6464
return suspendCoroutineUninterceptedOrReturn sc@{ uCont ->
6565
try {
6666
emit(uCont, value)

kotlinx-coroutines-core/native/src/flow/internal/SafeCollector.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ internal actual class SafeCollector<T> actual constructor(
1717
internal actual val collectContextSize = collectContext.fold(0) { count, _ -> count + 1 }
1818
private var lastEmissionContext: CoroutineContext? = null
1919

20-
override suspend fun emit(value: T) {
20+
actual override suspend fun emit(value: T) {
2121
val currentContext = currentCoroutineContext()
2222
currentContext.ensureActive()
2323
if (lastEmissionContext !== currentContext) {

0 commit comments

Comments
 (0)