Rename: Do not rename ambiguous references in import directives

#KT-6363 Fixed
This commit is contained in:
Alexey Sedunov
2016-06-01 12:19:28 +03:00
parent 8ba1aff7e6
commit fe01035e3c
12 changed files with 141 additions and 13 deletions
@@ -0,0 +1,9 @@
package lib
fun bar(n: Int) {
}
fun foo(n: Int, s: String) {
}
@@ -0,0 +1,12 @@
package usage;
import lib.LibKt;
import static lib.LibKt.foo;
public class JUsage {
void test() {
LibKt.bar(1);
foo(1, "2");
}
}
@@ -0,0 +1,9 @@
package usage
import lib.foo
import lib.bar
fun test() {
bar(1)
foo(1, "2")
}
@@ -0,0 +1,7 @@
{
"type": "MARKED_ELEMENT",
"mainFile": "lib/lib.kt",
"newName": "bar",
"withRuntime": "true",
"overloadRenamer.onlyPrimaryElement": "true"
}
@@ -0,0 +1,9 @@
package lib
fun /*rename*/foo(n: Int) {
}
fun foo(n: Int, s: String) {
}
@@ -0,0 +1,10 @@
package usage;
import static lib.LibKt.foo;
public class JUsage {
void test() {
foo(1);
foo(1, "2");
}
}
@@ -0,0 +1,8 @@
package usage
import lib.foo
fun test() {
foo(1)
foo(1, "2")
}