Rename by-name parameter usage in function calls when renaming function's parameter
#KT-32999 fixed
This commit is contained in:
+3
@@ -0,0 +1,3 @@
|
||||
fun bar() {
|
||||
Foo(second = 1)
|
||||
}
|
||||
idea/testData/refactoring/rename/renameKotlinConstructorParameterWithByNameUsages/after/test/test.kt
Vendored
+1
@@ -0,0 +1 @@
|
||||
class Foo(val second: Int = 1)
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
fun bar() {
|
||||
Foo(first = 1)
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
class Foo(val /*rename*/first: Int = 1)
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"type": "MARKED_ELEMENT",
|
||||
"mainFile": "test/test.kt",
|
||||
"newName": "second",
|
||||
"withRuntime": "true"
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
fun bar() {
|
||||
foo(second = 1)
|
||||
}
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
fun foo(second: Int = 1) {
|
||||
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
fun bar() {
|
||||
foo(first = 1)
|
||||
}
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
fun foo(/*rename*/first: Int = 1) {
|
||||
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"type": "MARKED_ELEMENT",
|
||||
"mainFile": "test/test.kt",
|
||||
"newName": "second",
|
||||
"withRuntime": "true"
|
||||
}
|
||||
Reference in New Issue
Block a user