Files
kotlin-fork/compiler/testData/diagnostics/tests/inference/cannotCompleteResolveWithFunctionLiterals.kt
T
Denis Zharkov 4c69416f2b Report warning on unused entities that can be renamed to _
Currently it's all about lambda parameters/destructuring entries

 #KT-14347 In Progress
2016-10-24 10:19:25 +03:00

11 lines
310 B
Kotlin
Vendored

// !DIAGNOSTICS: -CONFLICTING_JVM_DECLARATIONS
package f
fun <R> h(<!UNUSED_PARAMETER!>f<!>: (Boolean) -> R) = 1
fun <R> h(<!UNUSED_PARAMETER!>f<!>: (String) -> R) = 2
fun test() = <!CANNOT_COMPLETE_RESOLVE!>h<!>{ <!CANNOT_INFER_PARAMETER_TYPE, UNUSED_PARAMETER!>i<!> -> getAnswer() }
fun getAnswer() = 42