FIR: support adapted callable reference with vararg
This commit is contained in:
committed by
Mikhail Glukhikh
parent
4332e95b8a
commit
0e54f98b79
-21
@@ -1,21 +0,0 @@
|
||||
// !LANGUAGE: +SuspendConversion
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
fun unitCoercion(f: suspend () -> Unit) {}
|
||||
fun foo(): Int = 0
|
||||
|
||||
fun defaults(f: suspend (Int) -> String) {}
|
||||
fun bar(i: Int, l: Long = 42L): String = ""
|
||||
|
||||
fun varargs(f: suspend (Int, Int, Int) -> String) {}
|
||||
fun baz(vararg ints: Int): String = ""
|
||||
|
||||
fun unitCoercionAndDefaults(f: suspend () -> Unit) {}
|
||||
fun all(s: String = ""): Int = 0
|
||||
|
||||
fun test() {
|
||||
unitCoercion(::foo)
|
||||
defaults(::bar)
|
||||
<!INAPPLICABLE_CANDIDATE!>varargs<!>(<!UNRESOLVED_REFERENCE!>::baz<!>)
|
||||
unitCoercionAndDefaults(::all)
|
||||
}
|
||||
Vendored
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +SuspendConversion
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
|
||||
Reference in New Issue
Block a user