Files
kotlin/compiler/testData/codegen/bytecodeText/capturedVarsOptimization/withStackNormalization.kt
Dmitry Petrov 3c09a26e16 KT-5248 Don't wrap variable if it is captured only in inlined closures
Remove non-escaping Ref's on bytecode postprocessing pass.
2017-03-13 09:04:31 +03:00

14 lines
191 B
Kotlin
Vendored

// WITH_RUNTIME
fun add(x: Int, y: Int) = x + y
fun test() {
var x = 0
run {
x += add(1, try { 1 } catch (e: Throwable) { 42 })
}
}
// 0 NEW
// 0 GETFIELD
// 0 PUTFIELD