Files
kotlin-fork/compiler/testData/codegen/boxInline/callableReference/adaptedReferences/inlineVararg.kt
T
Alexander Udalov 1071919706 Remove backend tests on old inference
Also remove any mentions of NewInference, and rename some tests.
2021-11-09 20:07:33 +01:00

20 lines
353 B
Kotlin
Vendored

// IGNORE_BACKEND: WASM
// WASM_MUTE_REASON: IGNORED_IN_JS
// FILE: 1.kt
package test
inline fun foo(f: (Int, Int) -> Int): Int =
f(42, 117)
inline fun bar (vararg xs: Int): Int {
var sum = 0
for (x in xs) sum += x
return sum
}
// FILE: 2.kt
import test.*
fun box(): String = if (foo(::bar) == 159) "OK" else "fail"