Add some tests on adapted references with varargs and reflection

Also rename "varargAndDefaults" test directory to "adaptedReferences"
This commit is contained in:
Alexander Udalov
2020-04-06 18:44:36 +02:00
parent 66995fe1a5
commit fa879e667f
27 changed files with 718 additions and 674 deletions
@@ -0,0 +1,13 @@
// !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"