Intentions: Move member of companion object to corresponding class
#KT-9697 Fixed
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package a
|
||||
|
||||
class A {
|
||||
companion object {
|
||||
fun foo() {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class B {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun foo() {
|
||||
A.B()
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package b;
|
||||
|
||||
import a.A;
|
||||
|
||||
class J {
|
||||
void foo() {
|
||||
A.B b = new A.B();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package a
|
||||
|
||||
class A {
|
||||
companion object {
|
||||
fun foo() {
|
||||
|
||||
}
|
||||
|
||||
class <caret>B {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun foo() {
|
||||
A.Companion.B()
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package b;
|
||||
|
||||
import a.A;
|
||||
|
||||
class J {
|
||||
void foo() {
|
||||
A.Companion.B b = new A.Companion.B();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"mainFile": "a/A.kt",
|
||||
"intentionClass": "org.jetbrains.kotlin.idea.intentions.MoveMemberOutOfCompanionObjectIntention",
|
||||
"withRuntime": "true"
|
||||
}
|
||||
Reference in New Issue
Block a user