Files
kotlin-fork/compiler/testData/codegen/box/callableReference/adaptedReferences/inlineVarargInts.kt
T
Alexander Udalov fa879e667f Add some tests on adapted references with varargs and reflection
Also rename "varargAndDefaults" test directory to "adaptedReferences"
2020-04-08 19:15:40 +02:00

14 lines
265 B
Kotlin
Vendored

// !LANGUAGE: +NewInference
// IGNORE_BACKEND_FIR: JVM_IR
// WITH_RUNTIME
// KJS_WITH_FULL_RUNTIME
inline fun foo(x: (Int, Int) -> Int): Int =
x(120,3)
fun bar(vararg x: Int): Int =
x.sum()
fun box(): String =
if (foo(::bar) == 123) "OK" else "FAIL"