[FIR] Fix smartcast after elvis with escaping lambda, ^KT-44510 Fixed
This commit is contained in:
@@ -14,7 +14,7 @@ inline fun <R> callItContracted(fn: () -> R): R {
|
||||
|
||||
fun smartIt(p1: String?, p2: String?) {
|
||||
p1 ?: callIt { return }
|
||||
p1<!UNSAFE_CALL!>.<!>length
|
||||
p1.length
|
||||
|
||||
p2 ?: callItContracted { return }
|
||||
p2.length
|
||||
|
||||
@@ -6,5 +6,5 @@ fun <R> callIt(fn: () -> R): R = TODO()
|
||||
|
||||
fun smartIt(p1: String?, p2: String?) {
|
||||
p1 ?: callIt { TODO() }
|
||||
p1<!UNSAFE_CALL!>.<!>length // smartcast
|
||||
p1.length // smartcast
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user