Escape special Name used as parameter, custom function names etc
#EA-209929 #KT-51248 Fixed
This commit is contained in:
committed by
Space
parent
c08d42d6bb
commit
4de9de5fc5
@@ -25,8 +25,6 @@ fun Name.render(): String {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun Name.shouldBeEscaped(): Boolean {
|
private fun Name.shouldBeEscaped(): Boolean {
|
||||||
if (isSpecial) return false
|
|
||||||
|
|
||||||
val string = asString()
|
val string = asString()
|
||||||
return string in KeywordStringsGenerated.KEYWORDS || string.any { !Character.isLetterOrDigit(it) && it != '_' }
|
return string in KeywordStringsGenerated.KEYWORDS || string.any { !Character.isLetterOrDigit(it) && it != '_' }
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user