-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Commit
(cherry picked from commit f7a9bc3)
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// TARGET_BACKEND: JVM | ||
// WITH_RUNTIME | ||
// WITH_COROUTINES | ||
// FILE: a.kt | ||
@file:JvmMultifileClass | ||
@file:JvmName("A") | ||
|
||
import kotlin.coroutines.* | ||
import kotlin.coroutines.intrinsics.* | ||
|
||
@Suppress("UNSUPPORTED_FEATURE") | ||
inline class I(val x: Any?) | ||
|
||
suspend fun <T> suspendHere(t: T): T = t | ||
|
||
suspend fun f(): I = I(suspendHere("OK")) | ||
|
||
// FILE: z.kt | ||
import helpers.* | ||
import kotlin.coroutines.* | ||
|
||
fun box(): String { | ||
var result = "fail" | ||
suspend { result = f().x as String }.startCoroutine(EmptyContinuation) | ||
return result | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// WITH_RUNTIME | ||
// WITH_COROUTINES | ||
// IGNORE_BACKEND: JS_IR | ||
|
||
import helpers.* | ||
import kotlin.coroutines.* | ||
import kotlin.coroutines.intrinsics.* | ||
|
||
@Suppress("UNSUPPORTED_FEATURE") | ||
inline class I(val x: Any?) | ||
|
||
class C { | ||
private suspend fun f(): I { | ||
return I("OK") | ||
} | ||
|
||
fun g() = suspend { f() } | ||
} | ||
|
||
val c: Continuation<Unit>? = null | ||
|
||
fun box(): String { | ||
var result = "fail" | ||
suspend { result = C().g()().x as String }.startCoroutine(EmptyContinuation) | ||
|
||
return result | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.