FILE: notUselessCast_2.kt public final data class Foo : R|kotlin/Any| { public constructor(foo: R|kotlin/String|): R|Foo| { super() } public final val foo: R|kotlin/String| = R|/foo| public get(): R|kotlin/String| public final operator fun component1(): R|kotlin/String| public final fun copy(foo: R|kotlin/String| = this@R|/Foo|.R|/Foo.foo|): R|Foo| } public final class Bar : R|kotlin/Any| { public constructor(bar: R|kotlin/String|): R|Bar| { super() } public final val bar: R|kotlin/String| = R|/bar| public get(): R|kotlin/String| } public final fun R|Bar|.toFoo(): R|Foo| { ^toFoo R|/Foo.Foo|(this@R|/toFoo|.R|/Bar.bar|) } public final class Wrapper : R|kotlin/Any| { public constructor(wrapped: R|T|): R|Wrapper| { super() } public final val wrapped: R|T| = R|/wrapped| public get(): R|T| public final fun map(f: R|(T) -> A|): R|Wrapper| { ^map R|/Wrapper.Wrapper|(R|/f|.R|SubstitutionOverride|(this@R|/Wrapper|.R|/Wrapper.wrapped|)) } public final fun swapWrappedValue(f: R|(T) -> Wrapper|): R|Wrapper| { ^swapWrappedValue R|/f|.R|SubstitutionOverride|>|(this@R|/Wrapper|.R|/Wrapper.wrapped|) } } public final fun test_1(): R|Wrapper| { ^test_1 R|/Wrapper.Wrapper|(R|/Bar.Bar|(String(bar))).R|SubstitutionOverride|>|( = map@fun (it: R|Bar|): R|Foo?| { ^ (R|/it|.R|/toFoo|() as R|Foo?|) } ).R|SubstitutionOverride|>|( = swapWrappedValue@fun (it: R|Foo?|): R|Wrapper| { ^ R|/Wrapper.Wrapper|(Null(null)) } ) } public final fun test_2(): R|Wrapper| { ^test_2 R|/Wrapper.Wrapper|(R|/Bar.Bar|(String(bar))).R|SubstitutionOverride|>|( = map@fun (it: R|Bar|): R|Foo| { ^ R|/it|.R|/toFoo|() } ).R|SubstitutionOverride|>|( = swapWrappedValue@fun (it: R|Foo|): R|Wrapper| { ^ R|/Wrapper.Wrapper#|(Null(null)) } ) }