mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[kotlin] k2 rename: don't try to qualify local properties to resolve conflicts
^KTIJ-28584 fixed GitOrigin-RevId: bf6e78f41797427bd740cd978dd750d3ea76007b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
c581cbc925
commit
48d5ff6111
+5
@@ -388,6 +388,11 @@ public class InplaceRenameTestGenerated extends AbstractInplaceRenameTest {
|
||||
runTest("testData/refactoring/rename/inplace/HidingParameterByLocal.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("HidingPropertyByLocal.kt")
|
||||
public void testHidingPropertyByLocal() throws Exception {
|
||||
runTest("testData/refactoring/rename/inplace/HidingPropertyByLocal.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("HidingPropertyBySetterParameter.kt")
|
||||
public void testHidingPropertyBySetterParameter() throws Exception {
|
||||
runTest("testData/refactoring/rename/inplace/HidingPropertyBySetterParameter.kt");
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
// NEW_NAME: b
|
||||
// RENAME: member
|
||||
package rename
|
||||
|
||||
val <caret>a = ""
|
||||
fun m() {
|
||||
val b = ""
|
||||
val c = a + b
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// NEW_NAME: b
|
||||
// RENAME: member
|
||||
package rename
|
||||
|
||||
val <caret>b = ""
|
||||
fun m() {
|
||||
val b = ""
|
||||
val c = rename.b + b
|
||||
}
|
||||
+2
-2
@@ -309,9 +309,9 @@ private fun createQualifiedExpression(callExpression: KtExpression, newName: Str
|
||||
val containerFQN =
|
||||
if (containingSymbol is KtClassOrObjectSymbol) {
|
||||
containingSymbol.classIdIfNonLocal?.asSingleFqName()?.parent()
|
||||
} else {
|
||||
} else if (containingSymbol == null) {
|
||||
(symbol?.psi as? KtElement)?.containingKtFile?.packageFqName
|
||||
}
|
||||
} else null
|
||||
containerFQN?.asString()?.takeIf { it.isNotEmpty() }
|
||||
}
|
||||
} ?: return null
|
||||
|
||||
+5
@@ -388,6 +388,11 @@ public class K2InplaceRenameTestGenerated extends AbstractK2InplaceRenameTest {
|
||||
runTest("../../idea/tests/testData/refactoring/rename/inplace/HidingParameterByLocal.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("HidingPropertyByLocal.kt")
|
||||
public void testHidingPropertyByLocal() throws Exception {
|
||||
runTest("../../idea/tests/testData/refactoring/rename/inplace/HidingPropertyByLocal.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("HidingPropertyBySetterParameter.kt")
|
||||
public void testHidingPropertyBySetterParameter() throws Exception {
|
||||
runTest("../../idea/tests/testData/refactoring/rename/inplace/HidingPropertyBySetterParameter.kt");
|
||||
|
||||
Reference in New Issue
Block a user