fe5adab652
For example, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER
It became especially relevant after 0e84bf2053
that together with later commits bring a lot of unnecessary
NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER diagnostic
13 lines
383 B
Kotlin
Vendored
13 lines
383 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(f: (T) -> R): List<T> = throw Exception()
|
|
fun <T> _arrayList(vararg values: T) : List<T> = throw Exception()
|
|
|
|
class _Pair<A>(val a: A)
|
|
|
|
fun test() {
|
|
_arrayList(_Pair(1))._sortBy { it -> <!UNRESOLVED_REFERENCE!>xxx<!> }
|
|
}
|