[FIR] Fix smartcast after elvis with escaping lambda, ^KT-44510 Fixed

This commit is contained in:
Ivan Kochurkin
2022-04-04 22:16:36 +03:00
committed by teamcity
parent c7122c1492
commit 3566b7fe02
4 changed files with 33 additions and 27 deletions
@@ -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
}