KT-2146 Nullability casts in when.

#KT-2146 Fixed
This commit is contained in:
Alexander Udalov
2012-06-21 22:36:25 +04:00
parent 38fc57ae42
commit b5ba7123d5
2 changed files with 38 additions and 20 deletions
@@ -0,0 +1,9 @@
//KT-2146 Nullability casts in when.
package kt2146
fun f(s : Int?) : Int {
return when (s) {
null -> 3
else -> s // type mismatch
}
}