Files
kotlin/compiler/testData/codegen/bytecodeText/capturedVarsOptimization/withStackNormalization.kt
pyos ed83e3ccef Optimize more redundant kotlin/jvm/internal/Refs
The number of initializations of the `value` field before the live range
begins does not really matter so long as we insert a write of a default
value to the local if there were none.
2020-03-02 20:20:55 +03:00

13 lines
175 B
Kotlin
Vendored

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