FILE: boundSmartcasts.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| { lval y: R|kotlin/Any| = R|/x| when () { (R|/x| is R|A|) -> { R|/x|.R|/A.foo|() R|/y|.R|/A.foo|() } } } public final fun test_2(x: R|kotlin/Any|): R|kotlin/Unit| { lval y: R|kotlin/Any| = R|/x| when () { (R|/y| is R|A|) -> { R|/x|.R|/A.foo|() R|/y|.R|/A.foo|() } } } public final fun test_3(x: R|kotlin/Any|, y: R|kotlin/Any|): R|kotlin/Unit| { lvar z: R|kotlin/Any| = R|/x| when () { (R|/x| is R|A|) -> { R|/z|.R|/A.foo|() } } R|/z| = R|/y| when () { (R|/y| is R|B|) -> { R|/z|.#() R|/z|.R|/B.bar|() } } } public final fun test_4(y: R|kotlin/Any|): R|kotlin/Unit| { lvar x: R|kotlin/Any| = Int(1) (R|/x| as R|kotlin/Int|) R|/x|.R|kotlin/Int.inc|() R|/x| = R|/y| R|/x|.#() when () { (R|/y| is R|A|) -> { R|/x|.R|/A.foo|() R|/y|.R|/A.foo|() } } } public final class D : R|kotlin/Any| { public constructor(any: R|kotlin/Any?|): R|D| { super() } public final val any: R|kotlin/Any?| = R|/any| public get(): R|kotlin/Any?| } public final fun R|kotlin/Any|.baz(): R|kotlin/Unit| { } public final fun test_5(d: R|D|): R|kotlin/Unit| { lval a: R|kotlin/Any| = R|/d|.R|/D.any| ?: ^test_5 Unit R|/a|.R|/baz|() R|/d|.R|/D.any|.R|/baz|() (R|/a| as R|A|) R|/a|.R|/A.foo|() } public final fun test_6(d1: R|D|): R|kotlin/Unit| { lval a: R|kotlin/Any?| = R|/d1|.R|/D.any| (R|/a| as R|A|) R|/a|.R|/A.foo|() R|/d1|.R|/D.any|.R|/A.foo|() R|/d1|.R|/D.any|.R|/baz|() } public final fun test_7(d1: R|D|, d2: R|D|): R|kotlin/Unit| { lval a: R|kotlin/Any?| = R|/d1|?.{ $subj$.R|/D.any| } lval b: R|kotlin/Any?| = R|/d2|?.{ $subj$.R|/D.any| } (R|/a| as R|A|) R|/a|.R|/A.foo|() (R|/b| as R|B|) R|/b|.R|/B.bar|() }