Rename: Fix name quoting for automatic renamers

#KT-13282 Fixed
 #KT-13283 Fixed
This commit is contained in:
Alexey Sedunov
2016-08-10 17:10:56 +03:00
parent a5da9e81a0
commit 385640c86f
7 changed files with 35 additions and 1 deletions
@@ -164,6 +164,8 @@ fun KtCallableDeclaration.canOmitDeclaredType(initializerOrBodyExpression: KtExp
fun String.quoteIfNeeded(): String = if (KotlinNameSuggester.isIdentifier(this)) this else "`$this`"
fun String.unquote(): String = KtPsiUtil.unquoteIdentifier(this)
fun FqName.quoteSegmentsIfNeeded(): String {
return pathSegments().map { it.asString().quoteIfNeeded() }.joinToString(".")
}