Files
kotlin-fork/compiler/testData/resolvedCalls/arguments/functionLiterals/simpleGenericLambda.txt
T
Denis Zharkov 73799e2c3c Replace deprecated lambda syntax in testData
It's done with similar constructions where possible trying to preserve
intended behavior.
Some usages are removed because they test exactly the feature that
we are going to drop soon.
2015-09-25 08:29:25 +03:00

20 lines
454 B
Plaintext
Vendored

fun <T> foo(f: (T) -> String) {}
fun test() {
<caret>foo { x: Int -> "$x"}
}
Resolved call:
Candidate descriptor: fun <T> foo(f: (T) -> String): Unit defined in root package
Resulting descriptor: fun <T> foo(f: (Int) -> String): Unit defined in root package
Explicit receiver kind = NO_EXPLICIT_RECEIVER
Dispatch receiver = NO_RECEIVER
Extension receiver = NO_RECEIVER
Value arguments mapping:
SUCCESS f : (Int) -> String = { x: Int -> "$x"}