Files
kotlin-fork/compiler/testData/codegen/regressions/kt694.kt
T
2012-02-11 13:00:28 +02:00

19 lines
284 B
Kotlin

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"
}