Files
kotlin/compiler/testData/codegen/box/objects/kt694.kt
2019-11-19 11:00:09 +03:00

20 lines
316 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
enum class Test {
A,
B,
C
}
fun checkA(a: Test) = when(a) {
Test.B -> false
Test.A -> true
else -> false
}
fun box() : String {
if(!checkA(Test.A)) return "fail"
if( checkA(Test.C)) return "fail"
if( checkA(Test.B)) return "fail"
return "OK"
}