Add some tests on adapted references with varargs and reflection
Also rename "varargAndDefaults" test directory to "adaptedReferences"
This commit is contained in:
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
// !LANGUAGE: +NewInference +FunctionReferenceWithDefaultValueAsOtherType
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
fun foo(s: String = "kotlin", vararg t: String): Boolean {
|
||||
if (s != "kotlin") throw AssertionError(s)
|
||||
if (t.size != 0) throw AssertionError(t.size.toString())
|
||||
return true
|
||||
}
|
||||
|
||||
fun bar(f: () -> Unit) {
|
||||
f()
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
bar(::foo)
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user