fix broken merge; support for renaming primary constructor parameter which declares an overridden property
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
package testing.rename
|
||||
|
||||
public open class Foo(public open val second: String)
|
||||
|
||||
public class Bar(public override val /*rename*/second: String) : Foo(second) {
|
||||
}
|
||||
|
||||
fun usages(f: Foo, b: Bar): String {
|
||||
return f.second + b.second
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package testing;
|
||||
|
||||
import testing.rename.*;
|
||||
|
||||
class JavaClient {
|
||||
public String foo(Foo f) {
|
||||
return f.getSecond();
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package testng;
|
||||
|
||||
import testing.rename.Foo;
|
||||
|
||||
public class FooImpl extends Foo {
|
||||
public FooImpl(String first) {
|
||||
super(first);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSecond() {
|
||||
return "abc";
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
package testing.rename
|
||||
|
||||
public open class Foo(public open val first: String)
|
||||
|
||||
public class Bar(public override val /*rename*/first: String) : Foo(first) {
|
||||
}
|
||||
|
||||
fun usages(f: Foo, b: Bar): String {
|
||||
return f.first + b.first
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package testing;
|
||||
|
||||
import testing.rename.*;
|
||||
|
||||
class JavaClient {
|
||||
public String foo(Foo f) {
|
||||
return f.getFirst();
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package testng;
|
||||
|
||||
import testing.rename.Foo;
|
||||
|
||||
public class FooImpl extends Foo {
|
||||
public FooImpl(String first) {
|
||||
super(first);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFirst() {
|
||||
return "abc";
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"type": "MARKED_ELEMENT",
|
||||
"newName": "second",
|
||||
"mainFile": "RenameKotlinPrimaryConstructorPropertyFromOverride.kt"
|
||||
}
|
||||
Reference in New Issue
Block a user