mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-07 08:31:28 +00:00
These values can't be read after going out of scope. JVM implementation can take care of such object references on its own. Ref objects for captured variables are not different from any other objects stored in local variables, so there's really no reason to nullify these references explicitly. #KT-18478 Fixed Target versions 1.1.4
14 lines
168 B
Kotlin
Vendored
14 lines
168 B
Kotlin
Vendored
fun runNoInline(block: ()-> Unit): Unit {
|
|
block()
|
|
}
|
|
|
|
fun use(x: Int) {}
|
|
|
|
fun test(): Unit {
|
|
var x = 0
|
|
runNoInline {
|
|
use(x)
|
|
}
|
|
}
|
|
|
|
// 0 ACONST_NULL |