KT-175: infer nullability in then block from if condition

if (x != null) {
    // x is non-null here
}
This commit is contained in:
Stepan Koltsov
2011-11-03 21:11:03 +04:00
parent 84b216b88c
commit 019ccae7f6
3 changed files with 18 additions and 2 deletions
@@ -0,0 +1,11 @@
fun ff(a: String) = 1
fun gg() {
val a: String? = ""
if (a != null) {
ff(a)
}
}