mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-10 08:31:29 +00:00
When by String constants:
Generate TABLESWITCH/LOOKUPSWITCH bytecode operation for when operator by String constants
This commit is contained in:
committed by
Evgeny Gerashchenko
parent
5a1c995b5c
commit
d4cb822ee8
@@ -0,0 +1,15 @@
|
||||
|
||||
fun foo() : Int {
|
||||
val x : String = "dsa"
|
||||
when (x) {
|
||||
"a" -> return 1
|
||||
"b" -> return 1
|
||||
"c" -> return 1
|
||||
"d" -> return 1
|
||||
"e" -> return 1
|
||||
"f" -> return 1
|
||||
else -> return -1
|
||||
}
|
||||
}
|
||||
|
||||
// 1 TABLESWITCH
|
||||
Reference in New Issue
Block a user