Files
kotlin-fork/analysis/low-level-api-fir/testData/fileStructure/lambdasInWithBodyFunction.kt
T
Dmitrii Gridin 33e6a85a2d [LL FIR] rename testdata to testData to avoid copyright generation
We exclude testData pattern from copyright scope
2023-09-18 21:12:45 +00:00

16 lines
407 B
Kotlin
Vendored

inline fun <T, R> with(receiver: T, block: T.() -> R): R {/* DeclarationStructureElement */
return receiver.block()
}
inline fun <T, R> T.let(block: (T) -> R): R {/* DeclarationStructureElement */
return block(this)
}
class A {/* ClassDeclarationStructureElement */
fun foo() {/* DeclarationStructureElement */
val a = with(1) {
this.let { it }
}.let { 2 }
}
}