Add some tests on adapted references with varargs and reflection
Also rename "varargAndDefaults" test directory to "adaptedReferences"
This commit is contained in:
+11
@@ -0,0 +1,11 @@
|
||||
// !LANGUAGE: +NewInference +FunctionReferenceWithDefaultValueAsOtherType
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
fun foo(vararg a: String, result: String = "OK"): String =
|
||||
if (a.size == 0) result else "Fail"
|
||||
|
||||
fun call(f: () -> String): String = f()
|
||||
|
||||
fun box(): String {
|
||||
return call(::foo)
|
||||
}
|
||||
Reference in New Issue
Block a user