Support default arguments and varargs for callable references
#KT-8834 #KT-19869 #KT-25514
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// IGNORE_BACKEND: JS_IR, JVM_IR
|
||||
|
||||
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