Replace deprecated symbol usage: do not include 'Companion' in import directives when importing companion object
#KT-34078 Fixed
This commit is contained in:
committed by
Dmitry Gridin
parent
5250421002
commit
48968c0fe2
+13
@@ -0,0 +1,13 @@
|
||||
// "Replace with 'A.bar(x)'" "true"
|
||||
|
||||
package test
|
||||
|
||||
import a.A
|
||||
|
||||
@Deprecated("bla", ReplaceWith("A.bar(x)", "a.A"))
|
||||
fun foo(x: Any) {
|
||||
}
|
||||
|
||||
fun test() {
|
||||
A.bar(1)
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package a
|
||||
|
||||
class A {
|
||||
companion object {
|
||||
fun bar(x: Any) {}
|
||||
}
|
||||
}
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
// "Replace with 'A.bar(x)'" "true"
|
||||
|
||||
package test
|
||||
|
||||
@Deprecated("bla", ReplaceWith("A.bar(x)", "a.A"))
|
||||
fun foo(x: Any) {
|
||||
}
|
||||
|
||||
fun test() {
|
||||
<caret>foo(1)
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// "Replace with 'A.bar(x)'" "true"
|
||||
|
||||
package test
|
||||
|
||||
import a.A
|
||||
|
||||
@Deprecated("bla", ReplaceWith("A.bar(x)", "a.A"))
|
||||
fun foo(x: Any) {
|
||||
}
|
||||
|
||||
fun test() {
|
||||
A.bar(1)
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package a
|
||||
|
||||
class A {
|
||||
companion object F {
|
||||
fun bar(x: Any) {}
|
||||
}
|
||||
}
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
// "Replace with 'A.bar(x)'" "true"
|
||||
|
||||
package test
|
||||
|
||||
@Deprecated("bla", ReplaceWith("A.bar(x)", "a.A"))
|
||||
fun foo(x: Any) {
|
||||
}
|
||||
|
||||
fun test() {
|
||||
<caret>foo(1)
|
||||
}
|
||||
Reference in New Issue
Block a user