Changes on code review

This commit is contained in:
Valentin Kipyatkov
2015-11-10 20:43:47 +03:00
parent 4f9866f62f
commit d829f585f7
9 changed files with 50 additions and 10 deletions
@@ -0,0 +1,18 @@
// "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().<caret>foo("", 1)
}
}
public inline fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
@@ -0,0 +1,18 @@
// "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()
@@ -1,4 +1,4 @@
// "Fix extension function value call" "true"
// "Surround callee with parenthesis" "true"
class A {
val foo: B.() -> Unit get() = null!!
@@ -1,4 +1,4 @@
// "Fix extension function value call" "true"
// "Surround callee with parenthesis" "true"
class A {
val foo: B.() -> Unit get() = null!!