JVM_IR: refine the condition for mangling names of multifile members
Private $$forInline versions of public suspend functions should not be mangled. (Note that there are no $$forInline versions of private suspend functions, as those are effectively inline-only.)
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
// FILE: test.kt
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
// NO_CHECK_LAMBDA_INLINING
|
||||
// TARGET_BACKEND: JVM
|
||||
// !INHERIT_MULTIFILE_PARTS
|
||||
|
||||
// The lambda in box() attempts to store the result in a null Ref for some reason.
|
||||
// IGNORE_BACKEND: JVM
|
||||
// IGNORE_BACKEND_MULTI_MODULE: JVM
|
||||
|
||||
@file:JvmMultifileClass
|
||||
@file:JvmName("XKt")
|
||||
|
||||
suspend fun suspendHere() {}
|
||||
|
||||
suspend inline fun test(c: suspend () -> String): String {
|
||||
suspendHere()
|
||||
val result = c()
|
||||
suspendHere()
|
||||
return result
|
||||
}
|
||||
|
||||
// FILE: box.kt
|
||||
import kotlin.coroutines.*
|
||||
import helpers.*
|
||||
|
||||
fun box() : String {
|
||||
var res = "fail"
|
||||
suspend {
|
||||
res = test { "OK" }
|
||||
}.startCoroutine(EmptyContinuation)
|
||||
return res
|
||||
}
|
||||
Reference in New Issue
Block a user