15 lines
247 B
Plaintext
Vendored
15 lines
247 B
Plaintext
Vendored
// "Surround callee with parenthesis" "true"
|
|
|
|
class A {
|
|
val foo: B.() -> Unit get() = null!!
|
|
}
|
|
|
|
class B
|
|
|
|
fun test(a: A, b: B) {
|
|
with(b) {
|
|
(a.foo)()
|
|
}
|
|
}
|
|
|
|
public inline fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f() |