class A { val a: Any? field = a get constructor(a: Any?) /* primary */ { super/*Any*/() /* () */ } } class Context { constructor() /* primary */ { super/*Any*/() /* () */ } fun c(): Int { return 1 } } fun box(): String { return with(receiver = Context(), block = local fun Context.(): Nothing { var result: Int = 0 result = result.plus(other = testInline($context_receiver_0 = $this$with)) result = result.plus(other = testInlineWithArg($context_receiver_0 = $this$with, i = 1)) result = result.plus(other = 1.testInlineWithExtensionAndArg($context_receiver_0 = $this$with, i = 1)) result = result.plus(other = 1.testInlineWithExtensionAndMultipleArgs($context_receiver_0 = $this$with, i1 = 1, i2 = 2)) with(receiver = A(a = 1), block = local fun A.() { result = result.plus(other = 1.testInlineWithExtensionAndMultipleContextsAndArgs($context_receiver_0 = $this$with, $context_receiver_1 = $this$with, i1 = 1, i2 = 2)) result = result.plus(other = 1.testInlineWithExtensionAndMultipleContextsAndArgs($context_receiver_0 = $this$with, $context_receiver_1 = $this$with)) } ) return when { EQEQ(arg0 = result, arg1 = 23) -> "OK" else -> "fail" } } ) } inline fun testInline($context_receiver_0: Context): Int { return $context_receiver_0.c() } inline fun testInlineWithArg($context_receiver_0: Context, i: Int): Int { return i.plus(other = $context_receiver_0.c()) } inline fun Int.testInlineWithExtensionAndArg($context_receiver_0: Context, i: Int): Int { return .plus(other = i).plus(other = $context_receiver_0.c()) } inline fun Int.testInlineWithExtensionAndMultipleArgs($context_receiver_0: Context, i1: Int, i2: Int): Int { return .plus(other = i1).plus(other = i2).plus(other = $context_receiver_0.c()) } inline fun Int.testInlineWithExtensionAndMultipleContextsAndArgs($context_receiver_0: Context, $context_receiver_1: A, i1: Int = 1, i2: Int = 2): Int { return .plus(other = i1).plus(other = i2).plus(other = $context_receiver_0.c()).plus(other = when { EQEQ(arg0 = $context_receiver_1.(), arg1 = null) -> 0 else -> 1 }) }