KT-2457 Verify error when comparing not null value with null in when

backend-side changes
This commit is contained in:
Alexander Udalov
2012-07-20 14:40:30 +04:00
parent fa7ad96a4e
commit 2ac70ee35f
4 changed files with 28 additions and 1 deletions
@@ -0,0 +1,7 @@
fun foo(i: Int, j: Int?): String =
when (i) {
j -> "OK"
else -> "Fail"
}
fun box(): String = foo(0, 0)