Files
kotlin/compiler/testData/codegen/box/objects/kt694.kt
2015-08-10 16:24:12 +03:00

19 lines
286 B
Kotlin
Vendored

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