Files
kotlin-fork/compiler/testData/codegen/patternMatching/kt2466.kt
T
Alexander Udalov db008d5d38 KT-2466 "When" on boolean produces VerifyError
#KT-2466 Fixed
2012-07-19 21:39:41 +04:00

10 lines
176 B
Kotlin

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"