Replace trivial usages of suspendCoroutineOrReturn in tests
This is necessary since suspendCoroutineOrReturn gets removed in 1.3
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@
|
||||
// TREAT_AS_ONE_FILE
|
||||
import kotlin.coroutines.*
|
||||
import kotlin.coroutines.intrinsics.*
|
||||
suspend fun suspendHere(): String = suspendCoroutineOrReturn { x ->
|
||||
suspend fun suspendHere(): String = suspendCoroutineUninterceptedOrReturn { x ->
|
||||
x.resumeWith(SuccessOrFailure.success("OK"))
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import helpers.*
|
||||
// TREAT_AS_ONE_FILE
|
||||
import kotlin.coroutines.experimental.*
|
||||
import kotlin.coroutines.experimental.intrinsics.*
|
||||
suspend fun suspendHere(): String = suspendCoroutineOrReturn { x ->
|
||||
suspend fun suspendHere(): String = suspendCoroutineUninterceptedOrReturn { x ->
|
||||
x.resume("OK")
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import COROUTINES_PACKAGE.*
|
||||
import COROUTINES_PACKAGE.intrinsics.*
|
||||
|
||||
class Controller {
|
||||
suspend fun suspendHere(): Unit = suspendCoroutineOrReturn { x ->
|
||||
suspend fun suspendHere(): Unit = suspendCoroutineUninterceptedOrReturn { x ->
|
||||
x.resume(Unit)
|
||||
COROUTINE_SUSPENDED
|
||||
}
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import COROUTINES_PACKAGE.*
|
||||
import COROUTINES_PACKAGE.intrinsics.*
|
||||
|
||||
class Controller {
|
||||
suspend fun suspendHere(): Unit = suspendCoroutineOrReturn { x ->
|
||||
suspend fun suspendHere(): Unit = suspendCoroutineUninterceptedOrReturn { x ->
|
||||
x.resume(Unit)
|
||||
COROUTINE_SUSPENDED
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -7,7 +7,7 @@ import COROUTINES_PACKAGE.*
|
||||
import COROUTINES_PACKAGE.intrinsics.*
|
||||
|
||||
class Controller {
|
||||
suspend fun suspendHere(): Unit = suspendCoroutineOrReturn { x ->
|
||||
suspend fun suspendHere(): Unit = suspendCoroutineUninterceptedOrReturn { x ->
|
||||
x.resume(Unit)
|
||||
COROUTINE_SUSPENDED
|
||||
}
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import COROUTINES_PACKAGE.*
|
||||
import COROUTINES_PACKAGE.intrinsics.*
|
||||
|
||||
class Controller {
|
||||
suspend fun suspendHere(): Unit = suspendCoroutineOrReturn { x ->
|
||||
suspend fun suspendHere(): Unit = suspendCoroutineUninterceptedOrReturn { x ->
|
||||
x.resume(Unit)
|
||||
COROUTINE_SUSPENDED
|
||||
}
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import COROUTINES_PACKAGE.*
|
||||
import COROUTINES_PACKAGE.intrinsics.*
|
||||
|
||||
class Controller {
|
||||
suspend fun suspendHere(): Unit = suspendCoroutineOrReturn { x ->
|
||||
suspend fun suspendHere(): Unit = suspendCoroutineUninterceptedOrReturn { x ->
|
||||
x.resume(Unit)
|
||||
COROUTINE_SUSPENDED
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -7,7 +7,7 @@ import COROUTINES_PACKAGE.*
|
||||
import COROUTINES_PACKAGE.intrinsics.*
|
||||
|
||||
class Controller {
|
||||
suspend fun suspendHere(): Unit = suspendCoroutineOrReturn { x ->
|
||||
suspend fun suspendHere(): Unit = suspendCoroutineUninterceptedOrReturn { x ->
|
||||
x.resume(Unit)
|
||||
COROUTINE_SUSPENDED
|
||||
}
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ import COROUTINES_PACKAGE.*
|
||||
import COROUTINES_PACKAGE.intrinsics.*
|
||||
|
||||
class Controller {
|
||||
suspend fun suspendHere(): Unit = suspendCoroutineOrReturn { x ->
|
||||
suspend fun suspendHere(): Unit = suspendCoroutineUninterceptedOrReturn { x ->
|
||||
x.resume(Unit)
|
||||
COROUTINE_SUSPENDED
|
||||
}
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import COROUTINES_PACKAGE.*
|
||||
import COROUTINES_PACKAGE.intrinsics.*
|
||||
|
||||
class Controller {
|
||||
suspend fun suspendHere(): Unit = suspendCoroutineOrReturn { x ->
|
||||
suspend fun suspendHere(): Unit = suspendCoroutineUninterceptedOrReturn { x ->
|
||||
x.resume(Unit)
|
||||
COROUTINE_SUSPENDED
|
||||
}
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ import COROUTINES_PACKAGE.*
|
||||
import COROUTINES_PACKAGE.intrinsics.*
|
||||
|
||||
class Controller {
|
||||
suspend fun suspendHere(): Unit = suspendCoroutineOrReturn { x ->
|
||||
suspend fun suspendHere(): Unit = suspendCoroutineUninterceptedOrReturn { x ->
|
||||
x.resume(Unit)
|
||||
COROUTINE_SUSPENDED
|
||||
}
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import COROUTINES_PACKAGE.*
|
||||
import COROUTINES_PACKAGE.intrinsics.*
|
||||
|
||||
class Controller {
|
||||
suspend fun suspendHere(): Unit = suspendCoroutineOrReturn { x ->
|
||||
suspend fun suspendHere(): Unit = suspendCoroutineUninterceptedOrReturn { x ->
|
||||
x.resume(Unit)
|
||||
COROUTINE_SUSPENDED
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import COROUTINES_PACKAGE.intrinsics.*
|
||||
|
||||
var res = "FAIL"
|
||||
|
||||
suspend fun suspendHere() = suspendCoroutineOrReturn<Unit> {
|
||||
suspend fun suspendHere() = suspendCoroutineUninterceptedOrReturn<Unit> {
|
||||
res = "OK"
|
||||
it.resume(Unit)
|
||||
COROUTINE_SUSPENDED
|
||||
@@ -30,4 +30,4 @@ fun box() : String {
|
||||
// we surround it with return unit markers.
|
||||
// While denerating state machine, we remove them.
|
||||
// 0 ICONST_2
|
||||
// 0 ICONST_3
|
||||
// 0 ICONST_3
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ import helpers.*
|
||||
// TREAT_AS_ONE_FILE
|
||||
import kotlin.coroutines.*
|
||||
import kotlin.coroutines.intrinsics.*
|
||||
suspend fun suspendHere(): String = suspendCoroutineOrReturn { x ->
|
||||
suspend fun suspendHere(): String = suspendCoroutineUninterceptedOrReturn { x ->
|
||||
x.resume("OK")
|
||||
}
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -4,7 +4,7 @@ import helpers.*
|
||||
// TREAT_AS_ONE_FILE
|
||||
import kotlin.coroutines.experimental.*
|
||||
import kotlin.coroutines.experimental.intrinsics.*
|
||||
suspend fun suspendHere(): String = suspendCoroutineOrReturn { x ->
|
||||
suspend fun suspendHere(): String = suspendCoroutineUninterceptedOrReturn { x ->
|
||||
x.resume("OK")
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import helpers.*
|
||||
// TREAT_AS_ONE_FILE
|
||||
import kotlin.coroutines.experimental.*
|
||||
import kotlin.coroutines.experimental.intrinsics.*
|
||||
suspend fun suspendHere(): String = suspendCoroutineOrReturn { x ->
|
||||
suspend fun suspendHere(): String = suspendCoroutineUninterceptedOrReturn { x ->
|
||||
x.resume("OK")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user