Rename: Quote parameter name when necessary

#KT-13463 Fixed
This commit is contained in:
Alexey Sedunov
2016-08-16 15:15:23 +03:00
parent 238f99aa3d
commit 5e577c391c
7 changed files with 26 additions and 2 deletions
@@ -28,6 +28,7 @@ import org.jetbrains.kotlin.descriptors.FunctionDescriptor
import org.jetbrains.kotlin.descriptors.VariableDescriptor
import org.jetbrains.kotlin.idea.caches.resolve.resolveToDescriptor
import org.jetbrains.kotlin.idea.core.getDeepestSuperDeclarations
import org.jetbrains.kotlin.idea.core.quoteIfNeeded
import org.jetbrains.kotlin.idea.refactoring.canRefactor
import org.jetbrains.kotlin.idea.refactoring.getAffectedCallables
import org.jetbrains.kotlin.psi.KtCallableDeclaration
@@ -84,7 +85,7 @@ class RenameKotlinParameterProcessor : RenameKotlinPsiProcessor() {
else -> null
}
if (parameter == null) continue
allRenames[parameter] = newName
allRenames[parameter] = newName.quoteIfNeeded()
}
}