[JVM] Never treat arguments to methods as locals that can be removed.
Fixes KT-44347
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.coroutines.*
|
||||
|
||||
fun launch(block: suspend (Long) -> String): String {
|
||||
var result = ""
|
||||
block.startCoroutine(0L, Continuation(EmptyCoroutineContext) { result = it.getOrThrow() })
|
||||
return result
|
||||
}
|
||||
|
||||
suspend fun g() {}
|
||||
|
||||
class C {
|
||||
suspend fun f(i: Long): String {
|
||||
var x = 0
|
||||
listOf<Int>().map { x }
|
||||
g()
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String = launch(C()::f)
|
||||
Reference in New Issue
Block a user