DeprecatedSymbolUsageFix - correct dealing with implicit receivers + fixed KT-7776 in completion
#KT-7776 Fixed
This commit is contained in:
@@ -10,7 +10,7 @@ open class Base {
|
||||
class Derived : Base() {
|
||||
inner class InnerDerived : Base.Inner() {
|
||||
fun foo() {
|
||||
<caret>"a".newFun(this@Derived)
|
||||
"a".<caret>newFun(this@Derived)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
// "Replace with 'newFun(this)'" "true"
|
||||
|
||||
open class C {
|
||||
@deprecated("", ReplaceWith("newFun(this)"))
|
||||
fun oldFun(){}
|
||||
}
|
||||
|
||||
fun newFun(c: C){}
|
||||
|
||||
class X {
|
||||
companion object : C() {
|
||||
}
|
||||
|
||||
fun foo() {
|
||||
<caret>oldFun()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
// "Replace with 'newFun(this)'" "true"
|
||||
|
||||
open class C {
|
||||
@deprecated("", ReplaceWith("newFun(this)"))
|
||||
fun oldFun(){}
|
||||
}
|
||||
|
||||
fun newFun(c: C){}
|
||||
|
||||
class X {
|
||||
companion object : C() {
|
||||
}
|
||||
|
||||
fun foo() {
|
||||
<caret>newFun(Companion)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
// "Replace with 'newFun(this, s)'" "true"
|
||||
|
||||
interface I {
|
||||
@deprecated("", ReplaceWith("newFun(this, s)"))
|
||||
fun oldFun(s: String)
|
||||
}
|
||||
|
||||
fun newFun(i: I, s: String){}
|
||||
|
||||
fun I.foo() {
|
||||
with("a") {
|
||||
<caret>oldFun(this)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
// "Replace with 'newFun(this, s)'" "true"
|
||||
|
||||
interface I {
|
||||
@deprecated("", ReplaceWith("newFun(this, s)"))
|
||||
fun oldFun(s: String)
|
||||
}
|
||||
|
||||
fun newFun(i: I, s: String){}
|
||||
|
||||
fun I.foo() {
|
||||
with("a") {
|
||||
<caret>newFun(this@foo, this)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,5 +11,5 @@ class Outer {
|
||||
}
|
||||
|
||||
fun foo(inner: Outer.Inner) {
|
||||
<caret>newFun(inner)
|
||||
inner.newFun(inner)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user