Files
kotlin/compiler/testData/codegen/box/objects/kt694.kt
Alexander Udalov 41a416da60 Move blackBoxFile() testData to box/ directory
Delete all test methods (and empty test classes), since they'll be
auto-generated
2013-01-28 18:20:17 +04: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"
}