fun interface IFoo { abstract fun foo(i: Int) } fun interface IFoo2 : IFoo { } object A { private constructor() /* primary */ { TODO("IrDelegatingConstructorCall") /* InstanceInitializerCall */ } } object B { private constructor() /* primary */ { TODO("IrDelegatingConstructorCall") /* InstanceInitializerCall */ } } operator fun A.get(i: IFoo): Int { return 1 } operator fun A.set(i: IFoo, newValue: Int) { } operator fun B.get(i: IFoo): Int { return 1 } operator fun B.set(i: IFoo2, newValue: Int) { } fun withVararg(vararg xs: Int): Int { return 42 } fun test1() { { // BLOCK val tmp0_array: A = A val tmp2_sam: IFoo = local fun withVararg(p0: Int) { withVararg(xs = [p0]) /*~> Unit */ } /*-> IFoo */ set($receiver = tmp0_array, i = tmp2_sam, newValue = get($receiver = tmp0_array, i = tmp2_sam).plus(other = 1)) } } fun test2() { { // BLOCK val tmp0_array: B = B val tmp2_sam: IFoo2 = local fun withVararg(p0: Int) { withVararg(xs = [p0]) /*~> Unit */ } /*-> IFoo2 */ set($receiver = tmp0_array, i = tmp2_sam, newValue = get($receiver = tmp0_array, i = tmp2_sam).plus(other = 1)) } } fun test3(fn: Function1) { { // BLOCK val tmp0_array: A = A val tmp2_sam: IFoo = fn /*-> IFoo */ set($receiver = tmp0_array, i = tmp2_sam, newValue = get($receiver = tmp0_array, i = tmp2_sam).plus(other = 1)) } } fun test4(fn: Function1) { when { fn is IFoo -> { // BLOCK { // BLOCK val tmp0_array: A = A val tmp1_index0: Function1 = fn set($receiver = tmp0_array, i = tmp1_index0 /*as IFoo */, newValue = get($receiver = tmp0_array, i = tmp1_index0 /*as IFoo */).plus(other = 1)) } } } } fun test5(a: Any) { a as Function1 /*~> Unit */ { // BLOCK val tmp0_array: A = A val tmp2_sam: IFoo = a /*as Function1<@ParameterName(...) Int, Unit> */ /*-> IFoo */ set($receiver = tmp0_array, i = tmp2_sam, newValue = get($receiver = tmp0_array, i = tmp2_sam).plus(other = 1)) } } fun test6(a: Any) { a as Function1 /*~> Unit */ a as IFoo /*~> Unit */ { // BLOCK val tmp0_array: A = A val tmp1_index0: Any = a set($receiver = tmp0_array, i = tmp1_index0 /*as IFoo */, newValue = get($receiver = tmp0_array, i = tmp1_index0 /*as IFoo */).plus(other = 1)) } }