7a53b2f4c8
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
12 lines
461 B
Kotlin
Vendored
12 lines
461 B
Kotlin
Vendored
//KT-2741 Compiler can't infer a type of a function literal parameter when its body contains errors
|
|
package a
|
|
|
|
fun <T, R: Comparable<R>> Iterable<T>._sortBy(<!UNUSED_PARAMETER!>f<!>: (T) -> R): List<T> = throw Exception()
|
|
fun <T> _arrayList(vararg <!UNUSED_PARAMETER!>values<!>: T) : List<T> = throw Exception()
|
|
|
|
class _Pair<A>(val a: A)
|
|
|
|
fun test() {
|
|
_arrayList(_Pair(1))._sortBy { <!UNUSED_ANONYMOUS_PARAMETER!>it<!> -> <!UNRESOLVED_REFERENCE!>xxx<!> }
|
|
}
|