blob: 8765179392279bf2e0c655b10a43e4dc4e6c99af [file]
// RUN_PIPELINE_TILL: FRONTEND
// KT-9051: Allow smart cast for captured variables if they are not modified
fun foo(y: String?) {
var x: String? = null
if (x != null) {
y?.let { x = it }
x<!UNSAFE_CALL!>.<!>length // not-null or not-null
}
}
/* GENERATED_FIR_TAGS: assignment, equalityExpression, functionDeclaration, ifExpression, lambdaLiteral, localProperty,
nullableType, propertyDeclaration, safeCall */