Optimize const vals by inlining them at use sites
#KT-11734 Fixed #KT-13570 Fixed
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
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
|
||||
else -> return
|
||||
}
|
||||
}
|
||||
|
||||
// 1 LOOKUPSWITCH
|
||||
Reference in New Issue
Block a user