Extract Function: Fix replacement of references with class receivers (objects, class objects, enum classes)
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
// SIBLING:
|
||||
class MyClass {
|
||||
fun test() {
|
||||
<selection>P.A.foo()
|
||||
P.A.a</selection>
|
||||
}
|
||||
|
||||
enum class P {
|
||||
A
|
||||
|
||||
val a = 1
|
||||
fun foo() = 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
// SIBLING:
|
||||
class MyClass {
|
||||
fun test() {
|
||||
unit()
|
||||
}
|
||||
|
||||
enum class P {
|
||||
A
|
||||
|
||||
val a = 1
|
||||
fun foo() = 1
|
||||
}
|
||||
}
|
||||
|
||||
fun unit() {
|
||||
MyClass.P.A.foo()
|
||||
MyClass.P.A.a
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// SIBLING:
|
||||
class MyClass {
|
||||
fun test() {
|
||||
<selection>P.foo()
|
||||
P.a</selection>
|
||||
}
|
||||
|
||||
object P {
|
||||
val a = 1
|
||||
fun foo() = 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
// SIBLING:
|
||||
class MyClass {
|
||||
fun test() {
|
||||
unit()
|
||||
}
|
||||
|
||||
object P {
|
||||
val a = 1
|
||||
fun foo() = 1
|
||||
}
|
||||
}
|
||||
|
||||
fun unit() {
|
||||
MyClass.P.foo()
|
||||
MyClass.P.a
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package p.q
|
||||
|
||||
val a = 1
|
||||
fun foo() = 1
|
||||
|
||||
// SIBLING:
|
||||
class MyClass {
|
||||
fun test() {
|
||||
<selection>p.q.foo()
|
||||
p.q.a</selection>
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package p.q
|
||||
|
||||
val a = 1
|
||||
fun foo() = 1
|
||||
|
||||
// SIBLING:
|
||||
class MyClass {
|
||||
fun test() {
|
||||
unit()
|
||||
}
|
||||
}
|
||||
|
||||
fun unit() {
|
||||
foo()
|
||||
a
|
||||
}
|
||||
Reference in New Issue
Block a user