Take into account data flow info changes for special call (if/when/elvis/!!) arguments #KT-10824 Fixed
Smart casts on complex expressions look as no more possible
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
class A(val s: String = "FAIL")
|
||||
|
||||
private fun foo(a: A?, aOther: A?): A {
|
||||
return if (a == null) {
|
||||
A()
|
||||
}
|
||||
else {
|
||||
if (aOther == null) {
|
||||
return A()
|
||||
}
|
||||
aOther
|
||||
}
|
||||
}
|
||||
|
||||
fun box() = foo(A("???"), A("OK")).s
|
||||
Reference in New Issue
Block a user