Rename by-name parameter usage in function calls when renaming function's parameter

#KT-32999 fixed
This commit is contained in:
Ilya Kirillov
2020-02-04 16:06:26 +03:00
parent 349d07ad43
commit 4df8744b34
12 changed files with 57 additions and 0 deletions
@@ -0,0 +1,3 @@
fun bar() {
Foo(second = 1)
}
@@ -0,0 +1 @@
class Foo(val second: Int = 1)
@@ -0,0 +1,3 @@
fun bar() {
Foo(first = 1)
}
@@ -0,0 +1 @@
class Foo(val /*rename*/first: Int = 1)
@@ -0,0 +1,6 @@
{
"type": "MARKED_ELEMENT",
"mainFile": "test/test.kt",
"newName": "second",
"withRuntime": "true"
}
@@ -0,0 +1,3 @@
fun bar() {
foo(second = 1)
}
@@ -0,0 +1,3 @@
fun foo(second: Int = 1) {
}
@@ -0,0 +1,3 @@
fun bar() {
foo(first = 1)
}
@@ -0,0 +1,3 @@
fun foo(/*rename*/first: Int = 1) {
}
@@ -0,0 +1,6 @@
{
"type": "MARKED_ELEMENT",
"mainFile": "test/test.kt",
"newName": "second",
"withRuntime": "true"
}