when renaming a companion object, filter out references to companion object via its containing class, which shouldn't be updated by the rename
This commit is contained in:
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
class JavaUsage {
|
||||
public static void main(String[] args) {
|
||||
System.out.println(Foo.CONST);
|
||||
Foo.s();
|
||||
Foo.Bar.f();
|
||||
Foo foo = new Foo(); // not usage of companion object
|
||||
}
|
||||
}
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
class Foo {
|
||||
companion object Foo {
|
||||
fun f() {
|
||||
}
|
||||
|
||||
platformStatic fun s() {
|
||||
}
|
||||
|
||||
val CONST = 42
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
fun main(args: Array<String>) {
|
||||
// companion object usages
|
||||
Foo.f()
|
||||
val x = Foo
|
||||
|
||||
Foo.Foo.f()
|
||||
val xx = Foo.Foo
|
||||
}
|
||||
Reference in New Issue
Block a user