Change Signature: Do not replace implicit receivers in calls with at least one explicit receiver
#KT-7988 Fixed
This commit is contained in:
+7
@@ -0,0 +1,7 @@
|
||||
class C {
|
||||
fun String.foo() {
|
||||
1.bar()
|
||||
}
|
||||
|
||||
fun Int.bar() {}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
class C {
|
||||
fun <caret>foo(s: String) {
|
||||
1.bar()
|
||||
}
|
||||
|
||||
fun Int.bar() {}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
public inline fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
||||
|
||||
class C {
|
||||
fun String.foo() {
|
||||
with(1) {
|
||||
bar()
|
||||
}
|
||||
}
|
||||
|
||||
fun Int.bar() {}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
public inline fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
||||
|
||||
class C {
|
||||
fun <caret>foo(s: String) {
|
||||
with(1) {
|
||||
bar()
|
||||
}
|
||||
}
|
||||
|
||||
fun Int.bar() {}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
class C {
|
||||
fun foo(s: String) {
|
||||
1.bar()
|
||||
}
|
||||
|
||||
fun Int.bar() {}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
class C {
|
||||
fun String.<caret>foo() {
|
||||
1.bar()
|
||||
}
|
||||
|
||||
fun Int.bar() {}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
public inline fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
||||
|
||||
class C {
|
||||
fun foo(s: String) {
|
||||
with(1) {
|
||||
bar()
|
||||
}
|
||||
}
|
||||
|
||||
fun Int.bar() {}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
public inline fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
||||
|
||||
class C {
|
||||
fun String.<caret>foo() {
|
||||
with(1) {
|
||||
bar()
|
||||
}
|
||||
}
|
||||
|
||||
fun Int.bar() {}
|
||||
}
|
||||
Reference in New Issue
Block a user