Files
kotlin-fork/idea/testData/quickfix/migration/invokeOnExtensionFunctionWithExplicitReceiverFix/notSimple.kt.after
T
Valentin Kipyatkov d829f585f7 Changes on code review
2015-11-11 01:26:20 +03:00

18 lines
290 B
Plaintext
Vendored

// "Surround callee with parenthesis" "true"
class A {
val foo: B.(String, Int) -> Unit get() = null!!
}
class B {
fun getA() = A()
}
fun test(b: B) {
with(b) {
(b.getA().foo)("", 1)
}
}
public inline fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()