Minor. Fix tests after CoroutineContext introduction
This commit is contained in:
@@ -20,6 +20,7 @@ fun box(): String {
|
||||
return "OK"
|
||||
}
|
||||
|
||||
// 2 GETSTATIC kotlin/Unit.INSTANCE : Lkotlin/Unit;
|
||||
// 1 GETSTATIC EmptyContinuation.INSTANCE
|
||||
// 3 GETSTATIC
|
||||
// 2 GETSTATIC kotlin/Unit.INSTANCE
|
||||
// 1 GETSTATIC EmptyContinuation.Companion
|
||||
// 3 GETSTATIC kotlin\/coroutines\/EmptyCoroutineContext.INSTANCE
|
||||
// 6 GETSTATIC
|
||||
|
||||
@@ -48,6 +48,8 @@ fun box(): String {
|
||||
fun <T> async(c: suspend () -> T): CompletableFuture<T> {
|
||||
val future = CompletableFuture<T>()
|
||||
c.startCoroutine(object : Continuation<T> {
|
||||
override val context = EmptyCoroutineContext
|
||||
|
||||
override fun resume(data: T) {
|
||||
future.complete(data)
|
||||
}
|
||||
|
||||
@@ -45,6 +45,8 @@ fun box(): String {
|
||||
fun <T> async(c: suspend () -> T): CompletableFuture<T> {
|
||||
val future = CompletableFuture<T>()
|
||||
c.startCoroutine(object : Continuation<T> {
|
||||
override val context = EmptyCoroutineContext
|
||||
|
||||
override fun resume(data: T) {
|
||||
future.complete(data)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user