Remove workaround for COROUTINE_SUSPENDED property

This commit is contained in:
Roman Artemev
2018-09-10 17:53:48 +03:00
committed by romanart
parent 3dbc5ddb05
commit cc995bf1d5
3 changed files with 1 additions and 13 deletions
@@ -127,6 +127,3 @@ private inline fun <T> createCoroutineFromSuspendFunction(
}
}
}
@SinceKotlin("1.3")
public actual val COROUTINE_SUSPENDED: Any = CoroutineSingletons.COROUTINE_SUSPENDED
@@ -195,12 +195,3 @@ private inline fun <T> createCoroutineFromSuspendFunction(
}
}
}
/**
* This value is used as a return value of [suspendCoroutineOrReturn] `block` argument to state that
* the execution was suspended and will not return any result immediately.
*/
// It is implemented as property with getter to avoid ProGuard <clinit> problem with multifile IntrinsicsKt class
@SinceKotlin("1.3")
public actual val COROUTINE_SUSPENDED: Any
get() = CoroutineSingletons.COROUTINE_SUSPENDED
@@ -45,7 +45,7 @@ public suspend inline fun <T> suspendCoroutineUninterceptedOrReturn(crossinline
*/
// It is implemented as property with getter to avoid ProGuard <clinit> problem with multifile IntrinsicsKt class
@SinceKotlin("1.3")
public expect val COROUTINE_SUSPENDED: Any
public val COROUTINE_SUSPENDED: Any get() = CoroutineSingletons.COROUTINE_SUSPENDED
// Using enum here ensures two important properties:
// 1. It makes SafeContinuation serializable with all kinds of serialization frameworks (since all of them natively support enums)