Files
kotlin-fork/idea/testData/refactoring/introduceVariable/NoExplicitReceivers.kt
T
2014-06-25 19:08:04 +04:00

12 lines
228 B
Kotlin

fun main(args: Array<String>) {
with(A()) {
println(<selection>prop</selection>)
println(prop)
}
}
class A {
val prop = 1
}
public inline fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()