FILE: chooseCallableReferenceDependingOnInferredReceiver.kt public final class A : R|kotlin/Any| { public constructor(): R|A| { super() } public final fun foo(i: R|A|): R|kotlin/Unit| { } public final fun baz(i: R|A|): R|kotlin/Unit| { } } public final class B : R|kotlin/Any| { public constructor(): R|B| { super() } public final fun foo(s: R|B|): R|kotlin/Unit| { } public final fun foo(c: R|kotlin/Char|): R|kotlin/Unit| { } public final fun baz(s: R|B|): R|kotlin/Unit| { } } public final fun bar(f: R|(T) -> kotlin/Unit|): R|T| { ^bar R|kotlin/TODO|() } public final fun test(): R|kotlin/Unit| { R|/myWith#|>(R|/A.A|(), = myWith@fun R|A|.(): { lval t1: R|A| = R|/bar|(::R|/A.foo|) lval t2: R|A| = R|/bar|(::R|/A.baz|) ^ R|/myWith|>(R|/B.B|(), = myWith@fun R|B|.(): { lval a: R|A| = R|/bar|(::R|/A.foo|) lval b: R|B| = R|/bar|(::R|/B.foo|) lval t3: R|B| = R|/bar|(::R|/B.baz|) ^ R|/bar|<>(::#) } ) } ) } public final inline fun myWith(receiver: R|T|, block: R|T.() -> R|): R|R| { ^myWith R|kotlin/TODO|() }