mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
22 lines
256 B
Kotlin
Vendored
22 lines
256 B
Kotlin
Vendored
// !LANGUAGE: -ProhibitComparisonOfIncompatibleEnums
|
|
|
|
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
|