fix broken merge; support for renaming primary constructor parameter which declares an overridden property

This commit is contained in:
Dmitry Jemerov
2015-08-27 15:41:31 +02:00
parent 3e5c687e9d
commit 63d477e355
10 changed files with 114 additions and 28 deletions
@@ -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
}
@@ -0,0 +1,9 @@
package testing;
import testing.rename.*;
class JavaClient {
public String foo(Foo f) {
return f.getSecond();
}
}
@@ -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";
}
}
@@ -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
}
@@ -0,0 +1,9 @@
package testing;
import testing.rename.*;
class JavaClient {
public String foo(Foo f) {
return f.getFirst();
}
}
@@ -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";
}
}
@@ -0,0 +1,5 @@
{
"type": "MARKED_ELEMENT",
"newName": "second",
"mainFile": "RenameKotlinPrimaryConstructorPropertyFromOverride.kt"
}