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,9 @@
// KT-25514 Support usage of function reference with vararg where function of array is expected in new inference
fun foo(x: Int, vararg y: String): String = y[0]
fun useArray(f: (Int, Array<String>) -> String): String = f(1, Array(1) { "OK" })
fun box(): String {
return useArray(::foo)
}