Files
kotlin-fork/js/js.translator/testData/box/inline/extensionWithManyArguments.kt
T

15 lines
393 B
Kotlin
Vendored

package foo
// CHECK_NOT_CALLED_IN_SCOPE: scope=multiply_0 function=multiply_0$f
internal class A(val a: Int)
internal inline fun <T, R> with2(receiver: T, arg1: R, arg2: R, f: T.(R, R) -> R): R = receiver.f(arg1, arg2)
internal fun multiply(a: Int, b: Int, c: Int): Int = with2(A(a), b, c) { x, y -> a*x*y }
fun box(): String {
assertEquals(105, multiply(3, 5, 7))
return "OK"
}