Files
kotlin-fork/compiler/testData/diagnostics/tests/callableReference/resolve/withVararg.fir.kt
T
Denis.Zharkov 6e15ee8fea FIR: Refine callable reference resolution in assignment position
synthetic_select<() -> T>(::foo) form allows to select better candidate
than synthetic_select(::foo) with expect type `() -> T`
2021-11-10 22:00:01 +03:00

11 lines
284 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_PARAMETER
fun foo(vararg ii: Int) {}
fun foo(vararg ss: String) {}
fun foo(i: Int) {}
val fn1: (Int) -> Unit = ::foo
val fn2: (IntArray) -> Unit = ::foo
val fn3: (Int, Int) -> Unit = ::<!UNRESOLVED_REFERENCE!>foo<!>
val fn4: (Array<String>) -> Unit = ::foo