Files
Max Medvedev f05c69bce2 KTIJ-27059 tests for receiver highlighting
GitOrigin-RevId: 12597335151ff42e9347fe00143855d834ce662b
2023-09-21 18:45:53 +00:00

13 lines
302 B
Kotlin

class X {
operator fun invoke() {}
}
fun <info descr="null">~X</info>.foo() {
<info descr="null">this</info>()
<info descr="null">run</info> {
print(this()) // no highlighting. The receiver is from `run` here.
}
}
public inline fun <T, R> T.run(block: T.() -> R): R = block()