FILE: when.kt public abstract interface A : R|kotlin/Any| { public abstract fun foo(): R|kotlin/Unit| } public abstract interface B : R|kotlin/Any| { public abstract fun bar(): R|kotlin/Unit| } public final fun test_1(x: R|kotlin/Any?|): R|kotlin/Unit| { when () { (R|/x| is R|A|) -> { R|/x|.R|/A.foo|() } (R|/x| is R|B|) -> { R|/x|.R|/B.bar|() } } when () { (R|/x| !is R|A|) -> { } (R|/x| !is R|B|) -> { R|/x|.R|/A.foo|() } (R|/x| is R|kotlin/Int|) -> { R|/x|.R|/A.foo|() R|/x|.R|/B.bar|() R|/x|.R|kotlin/Int.inc|() } else -> { R|/x|.R|/A.foo|() R|/x|.R|/B.bar|() } } } public final fun test_2(x: R|kotlin/Any?|): R|kotlin/Unit| { when (R|/x|) { ($subj$ is R|A|) -> { R|/x|.R|/A.foo|() } ($subj$ is R|B|) -> { R|/x|.R|/B.bar|() } } when (R|/x|) { ($subj$ !is R|A|) -> { } ($subj$ !is R|B|) -> { R|/x|.R|/A.foo|() } ($subj$ is R|kotlin/Int|) -> { R|/x|.R|/A.foo|() R|/x|.R|/B.bar|() R|/x|.R|kotlin/Int.inc|() } else -> { R|/x|.R|/A.foo|() R|/x|.R|/B.bar|() } } } public final fun test_3(x: R|kotlin/Any?|): R|kotlin/Unit| { when (lval y: R|kotlin/Any?| = R|/x|) { ($subj$ is R|A|) -> { R|/x|.R|/A.foo|() R|/y|.R|/A.foo|() } ($subj$ is R|B|) -> { R|/x|.R|/B.bar|() R|/y|.R|/B.bar|() } } when (lval y: R|kotlin/Any?| = R|/x|) { ($subj$ !is R|A|) -> { } ($subj$ !is R|B|) -> { R|/x|.R|/A.foo|() R|/y|.R|/A.foo|() } ($subj$ is R|kotlin/Int|) -> { R|/x|.R|/A.foo|() R|/x|.R|/B.bar|() R|/x|.R|kotlin/Int.inc|() R|/y|.R|/A.foo|() R|/y|.R|/B.bar|() R|/y|.R|kotlin/Int.inc|() } else -> { R|/x|.R|/A.foo|() R|/x|.R|/B.bar|() R|/y|.R|/A.foo|() R|/y|.R|/B.bar|() } } } public final fun test_4(x: R|kotlin/Any|): R|kotlin/Unit| { when ((R|/x| as R|kotlin/Int|)) { ==($subj$, Int(1)) -> { R|/x|.R|kotlin/Int.inc|() } } R|/x|.R|kotlin/Int.inc|() }