KT-175: infer nullability in then block from if condition
if (x != null) {
// x is non-null here
}
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
|
||||
fun ff(a: String) = 1
|
||||
|
||||
fun gg() {
|
||||
val a: String? = ""
|
||||
|
||||
if (a != null) {
|
||||
ff(a)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user