Stdlib: review and suppress warnings
This commit is contained in:
@@ -54,6 +54,7 @@ internal fun <T> probeCoroutineCreated(completion: Continuation<T>): Continuatio
|
||||
* parameter in this function is `Continuation<*>`. See [probeCoroutineCreated] for details.
|
||||
*/
|
||||
@SinceKotlin("1.3")
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
internal fun probeCoroutineResumed(frame: Continuation<*>) {
|
||||
/** implementation of this function is replaced by debugger */
|
||||
}
|
||||
@@ -69,6 +70,7 @@ internal fun probeCoroutineResumed(frame: Continuation<*>) {
|
||||
* parameter in this function is `Continuation<*>`. See [probeCoroutineCreated] for details.
|
||||
*/
|
||||
@SinceKotlin("1.3")
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
internal fun probeCoroutineSuspended(frame: Continuation<*>) {
|
||||
/** implementation of this function is replaced by debugger */
|
||||
}
|
||||
|
||||
@@ -28,13 +28,13 @@ private class RunSuspend : Continuation<Unit> {
|
||||
|
||||
override fun resumeWith(result: Result<Unit>) = synchronized(this) {
|
||||
this.result = result
|
||||
(this as Object).notifyAll()
|
||||
@Suppress("PLATFORM_CLASS_MAPPED_TO_KOTLIN") (this as Object).notifyAll()
|
||||
}
|
||||
|
||||
fun await() = synchronized(this) {
|
||||
while (true) {
|
||||
when (val result = this.result) {
|
||||
null -> (this as Object).wait()
|
||||
null -> @Suppress("PLATFORM_CLASS_MAPPED_TO_KOTLIN") (this as Object).wait()
|
||||
else -> {
|
||||
result.getOrThrow() // throw up failure
|
||||
return
|
||||
|
||||
@@ -36,6 +36,7 @@ import kotlin.internal.InlineOnly
|
||||
*/
|
||||
@SinceKotlin("1.3")
|
||||
@InlineOnly
|
||||
@Suppress("UNUSED_PARAMETER", "RedundantSuspendModifier")
|
||||
public suspend inline fun <T> suspendCoroutineUninterceptedOrReturn(crossinline block: (Continuation<T>) -> Any?): T =
|
||||
throw NotImplementedError("Implementation of suspendCoroutineUninterceptedOrReturn is intrinsic")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user