Files
kotlin-fork/idea/testData/slicer/inflow/extensionLambdaImplicitParameter.kt
T
2020-04-18 01:24:54 +03:00

22 lines
260 B
Kotlin
Vendored

// FLOW: IN
fun foo(f: String.(Int) -> Unit) {
f("", 1)
"".f(2)
with("") {
f(3)
}
}
fun test() {
foo {
println(<caret>it)
}
}
inline fun <T, R> with(receiver: T, block: T.() -> R): R {
return receiver.block()
}