Files
kotlin/compiler/testData/codegen/bytecodeText/when/inlineConstValsInsideWhen.kt
Mikhail Zarechenskiy 0134b8819b Optimize const vals by inlining them at use sites
#KT-11734 Fixed
 #KT-13570 Fixed
2016-12-05 22:11:33 +03:00

17 lines
246 B
Kotlin
Vendored

const val A = 10
private const val B = 20
object Constants {
const val C = 30
}
fun foo(state: Int) {
when (state) {
A -> return
B -> return
Constants.C -> return
else -> return
}
}
// 1 LOOKUPSWITCH