mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-07 08:31:28 +00:00
20 lines
202 B
Kotlin
Vendored
20 lines
202 B
Kotlin
Vendored
enum class A {
|
|
OK
|
|
}
|
|
|
|
enum class B {
|
|
FAIL
|
|
}
|
|
|
|
fun f() = A.OK
|
|
|
|
fun box(): String {
|
|
return when (f()) {
|
|
B.FAIL -> "fail"
|
|
A.OK -> "OK"
|
|
}
|
|
}
|
|
|
|
// 0 TABLESWITCH
|
|
// 0 LOOKUPSWITCH
|