Rename: Qualify references to members of enum companions in case of conflict with enum entries
#KT-10033 Fixed (cherry picked from commit 3373d54)
This commit is contained in:
+8
@@ -0,0 +1,8 @@
|
||||
package test;
|
||||
|
||||
class Test {
|
||||
{
|
||||
E e = E.A;
|
||||
int n = E.A;
|
||||
}
|
||||
}
|
||||
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
package test
|
||||
|
||||
enum class E {
|
||||
A;
|
||||
|
||||
companion object {
|
||||
public const val A: Int = 1
|
||||
}
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val a = E.Companion.A + 2
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package test;
|
||||
|
||||
class Test {
|
||||
{
|
||||
E e = E.A;
|
||||
int n = E.B;
|
||||
}
|
||||
}
|
||||
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
package test
|
||||
|
||||
enum class E {
|
||||
A;
|
||||
|
||||
companion object {
|
||||
public const val /*rename*/B : Int = 1
|
||||
}
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val a = E.B + 2
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"type": "MARKED_ELEMENT",
|
||||
"mainFile": "test/test.kt",
|
||||
"newName": "A",
|
||||
"withRuntime": "true"
|
||||
}
|
||||
Reference in New Issue
Block a user