[FIR] Implement new bound smartcast algorithm
#KT-36055 Fixed
This commit is contained in:
+1
-1
@@ -3,5 +3,5 @@
|
||||
fun foo(y: String) {
|
||||
var x: String? = null
|
||||
y.let { x = it }
|
||||
x.<!INAPPLICABLE_CANDIDATE!>length<!> // Smart cast is not possible
|
||||
x.length // Smart cast is not possible
|
||||
}
|
||||
|
||||
+1
-1
@@ -4,6 +4,6 @@ fun foo(y: String?) {
|
||||
var x: String? = null
|
||||
if (x != null) {
|
||||
y?.let { x = it }
|
||||
x.<!INAPPLICABLE_CANDIDATE!>length<!> // not-null or not-null
|
||||
x.length // not-null or not-null
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user