Support default arguments and varargs for callable references
#KT-8834 #KT-19869 #KT-25514
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// IGNORE_BACKEND: JS, JS_IR, JVM_IR
|
||||
|
||||
fun foo(vararg l: Long, s: String = "OK"): String =
|
||||
if (l.size == 0) s else "Fail"
|
||||
|
||||
inline fun bar(f: () -> String): String = f()
|
||||
|
||||
fun box(): String = bar(::foo)
|
||||
Reference in New Issue
Block a user