KT-6118 Redundant type cast can be not redundant?
#KT-6118 Fixed
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
fun test(a: Any?, flag: Boolean, x: Any?) {
|
||||
if (a !is String) return
|
||||
<!DEBUG_INFO_SMARTCAST!>a<!>.length()
|
||||
|
||||
val b: Any?
|
||||
|
||||
if (flag) {
|
||||
b = a
|
||||
<!DEBUG_INFO_SMARTCAST!>b<!>.length()
|
||||
}
|
||||
else {
|
||||
b = x
|
||||
b.<!UNRESOLVED_REFERENCE!>length<!>()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user