Add some tests on adapted references with varargs and reflection
Also rename "varargAndDefaults" test directory to "adaptedReferences"
This commit is contained in:
+9
@@ -0,0 +1,9 @@
|
||||
// !LANGUAGE: +NewInference +FunctionReferenceWithDefaultValueAsOtherType
|
||||
|
||||
fun foo(x: String, y: String = "K"): String = x + y
|
||||
|
||||
fun call(f: (String) -> String, x: String): String = f(x)
|
||||
|
||||
fun box(): String {
|
||||
return call(::foo, "O")
|
||||
}
|
||||
Reference in New Issue
Block a user