d01a2c7271
^KT-45814 Can't reproduce
24 lines
665 B
Kotlin
Vendored
24 lines
665 B
Kotlin
Vendored
// SKIP_TXT
|
|
// ISSUE: KT-45814
|
|
|
|
class Foo(val bar: String?)
|
|
|
|
fun test_1(foo: Foo?) {
|
|
foo!!.bar.let {
|
|
foo<!UNNECESSARY_SAFE_CALL!>?.<!>bar?.length // Unnecessary
|
|
<!DEBUG_INFO_SMARTCAST!>foo<!>.bar?.length // Correct
|
|
foo<!UNNECESSARY_SAFE_CALL!>?.<!>bar?.length // Unnecessary
|
|
}
|
|
<!DEBUG_INFO_SMARTCAST!>foo<!>.bar?.length
|
|
foo<!UNNECESSARY_SAFE_CALL!>?.<!>bar?.length // Unnecessary
|
|
}
|
|
|
|
fun test_2(foo: Foo?) {
|
|
foo!!.bar.let {
|
|
<!DEBUG_INFO_SMARTCAST!>foo<!>.bar?.length // Correct
|
|
foo<!UNNECESSARY_SAFE_CALL!>?.<!>bar?.length // Unnecessary
|
|
Unit
|
|
}
|
|
<!DEBUG_INFO_SMARTCAST!>foo<!>.bar?.length
|
|
}
|