Supported renaming default objects with default names.
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
class JavaUsage {
|
||||
public static void main(String[] args) {
|
||||
System.out.println(Foo.CONST);
|
||||
Foo.s();
|
||||
Foo.Baz.f();
|
||||
Foo foo = new Foo(); // not usage of default object
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
class Foo {
|
||||
default object Baz {
|
||||
fun f() {
|
||||
}
|
||||
|
||||
platformStatic fun s() {
|
||||
}
|
||||
|
||||
val CONST = 42
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
fun main(args: Array<String>) {
|
||||
// class object usages
|
||||
Foo.f()
|
||||
val x = Foo
|
||||
|
||||
Foo.Baz.f()
|
||||
val xx = Foo.Baz
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
class JavaUsage {
|
||||
public static void main(String[] args) {
|
||||
System.out.println(Foo.CONST);
|
||||
Foo.s();
|
||||
Foo.Default.f();
|
||||
Foo foo = new Foo(); // not usage of default object
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
class Foo {
|
||||
default object {
|
||||
fun f() {
|
||||
}
|
||||
|
||||
platformStatic fun s() {
|
||||
}
|
||||
|
||||
val CONST = 42
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
fun main(args: Array<String>) {
|
||||
// class object usages
|
||||
Foo.f()
|
||||
val x = Foo
|
||||
|
||||
Foo.Default.f()
|
||||
val xx = Foo.Default
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"type": "KOTLIN_CLASS",
|
||||
"classId": "/Foo.Default",
|
||||
"oldName": "Default",
|
||||
"newName": "Baz",
|
||||
"mainFile": "toBeRenamed.kt"
|
||||
}
|
||||
Reference in New Issue
Block a user