a4bb47a73f
if there are function literals without declared parameter types, try adding constraint with current substituted result first (known type parameters), if there is error, try adding constraint with 'dont_care' substitution
12 lines
278 B
Kotlin
12 lines
278 B
Kotlin
package n
|
|
|
|
//+JDK
|
|
import java.util.*
|
|
|
|
fun expected<T>(t: T, <!UNUSED_PARAMETER!>f<!>: () -> T) : T = t
|
|
|
|
fun test(arrayList: ArrayList<Int>, list: List<Int>) {
|
|
val <!UNUSED_VARIABLE!>t<!> = expected(arrayList, { list.reverse() })
|
|
}
|
|
|
|
fun <T> List<T>.reverse() : List<T> = this |