Change Signature: Skip implicit receiver references if extension receiver is dropped

This commit is contained in:
Alexey Sedunov
2016-02-08 14:36:24 +03:00
parent a9ddc4da1a
commit 8e81d0ce5f
4 changed files with 11 additions and 9 deletions
@@ -1,11 +1,11 @@
fun foo(s: String, k: Int): Boolean {
return this.k + s.length - k > 0
return this.k + s.length - k - l > 0
}
class X(val k: Int)
class X(val k: Int, val l: Int)
fun test() {
with(X(0)) {
with(X(0, 1)) {
foo("1", 2)
}
foo("1", 2)
@@ -1,5 +1,5 @@
class J {
void test() {
RemoveReceiverBeforeKt.foo(new X(0), "1", 2);
RemoveReceiverBeforeKt.foo(new X(0, 1), "1", 2);
}
}
@@ -1,12 +1,12 @@
fun X.<caret>foo(s: String, k: Int): Boolean {
return this.k + s.length - k > 0
return this.k + s.length - k - l > 0
}
class X(val k: Int)
class X(val k: Int, val l: Int)
fun test() {
with(X(0)) {
with(X(0, 1)) {
foo("1", 2)
}
X(0).foo("1", 2)
X(0, 1).foo("1", 2)
}