Files
kotlin-fork/compiler/testData/codegen/box/when/kt2466.kt
T
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

10 lines
176 B
Kotlin
Vendored

fun foo(b: Boolean) =
when (b) {
false -> 0
true -> 1
else -> 2
}
fun box(): String = if (foo(false) == 0 && foo(true) == 1) "OK" else "Fail"