Objective-C names with '$' in them where blowing up (#1497)
Now they do not. May be other problematic characters.
This commit is contained in:
committed by
SvyatoslavScherbina
parent
c97124ea60
commit
09c9a60b30
+1
-1
@@ -38,7 +38,7 @@ typealias KotlinExpression = String
|
||||
* For this identifier constructs the string to be parsed by Kotlin as `SimpleName`
|
||||
* defined [here](https://kotlinlang.org/docs/reference/grammar.html#SimpleName).
|
||||
*/
|
||||
fun String.asSimpleName(): String = if (this in kotlinKeywords) {
|
||||
fun String.asSimpleName(): String = if (this in kotlinKeywords || this.contains("$")) {
|
||||
"`$this`"
|
||||
} else {
|
||||
this
|
||||
|
||||
Reference in New Issue
Block a user