Files
kotlin-fork/compiler/testData/diagnostics/tests/inference/nestedCalls/completeNestedForVariableAsFunctionCall.kt
T
Svetlana Isakova 1d55e359a5 complete type inference(*) for variable as function call as well
* dependent on expected type
+ get rid of instanceof ResolvedCallImpl check
2013-03-07 13:11:21 +04:00

16 lines
264 B
Kotlin

package j
trait MyFunc<T> {}
class A(val b: B) {
}
class B {
fun <T> invoke(<!UNUSED_PARAMETER!>f<!>: (T) -> T): MyFunc<T> = throw Exception()
}
fun id<R>(r: R) = r
fun foo(a: A) {
val <!UNUSED_VARIABLE!>r<!> : MyFunc<Int> = id (a.b { x -> x + 14 })
}