FILE: assignSafeCall.kt public final class A : R|kotlin/Any| { public constructor(): R|A| { super() } public final fun foo(): R|kotlin/Int| { ^foo Int(1) } public final val x: R|kotlin/Int| = Int(1) public get(): R|kotlin/Int| public final fun bar(): R|kotlin/Unit| { } } public final fun test_1(a: R|A?|): R|kotlin/Unit| { lval x: R|kotlin/Int?| = R|/a|?.{ $subj$.R|/A.x| } when () { !=(R|/x|, Null(null)) -> { R|/a|.R|/A.bar|() } } } public final fun test_2(a: R|A?|): R|kotlin/Unit| { lval x: R|kotlin/Int?| = R|/a|?.{ $subj$.R|/A.foo|() } when () { !=(R|/x|, Null(null)) -> { R|/a|.R|/A.bar|() } } } public final fun test_3(x: R|kotlin/Any?|): R|kotlin/Unit| { lval a: R|A| = (R|/x| as? R|A|) ?: ^test_3 Unit R|/a|.R|/A.foo|() R|/x|.R|/A.foo|() } public abstract interface B : R|kotlin/Any| { public abstract fun foo(): R|kotlin/Int| public abstract val x: R|kotlin/Int| public get(): R|kotlin/Int| public abstract fun bar(): R|kotlin/Unit| } public final fun test_1(a: R|B?|): R|kotlin/Unit| { lval x: R|kotlin/Int?| = R|/a|?.{ $subj$.R|/B.x| } when () { !=(R|/x|, Null(null)) -> { R|/a|.R|/B.bar|() } } } public final fun test_2(a: R|B?|): R|kotlin/Unit| { lval x: R|kotlin/Int?| = R|/a|?.{ $subj$.R|/B.foo|() } when () { !=(R|/x|, Null(null)) -> { R|/a|.R|/B.bar|() } } } public final fun test_3(x: R|kotlin/Any?|): R|kotlin/Unit| { lval a: R|B| = (R|/x| as? R|B|) ?: ^test_3 Unit R|/a|.R|/B.foo|() R|/x|.R|/B.foo|() }