Files
kotlin/compiler/testData/diagnostics/tests/functionAsExpression/AutoLabels.kt
Mikhail Glukhikh 7a53b2f4c8 Introduce UNUSED_ANONYMOUS_PARAMETER for anonymous functions
It is not reported for 1.0 language version because
renaming to _ is not possible. It has weak warning severity

So #KT-8813 Fixed
So #KT-16875 Fixed
2017-04-04 14:23:30 +03:00

12 lines
341 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_ANONYMOUS_PARAMETER -UNUSED_VARIABLE
fun <T, R> Iterable<T>.map(transform: (T) -> R): List<R> = null!!
fun autolabel(l: List<Int>) = l.map (fun (i: Int): Int {
return@map 4
})
fun unresolvedMapLabel(l: List<Int>) = l.map (l@ fun(i: Int): Int {
return<!UNRESOLVED_REFERENCE!>@map<!> 4
})