Objective-C names with '$' in them where blowing up (#1497)

Now they do not. May be other problematic characters.
This commit is contained in:
Kevin Galligan
2018-04-13 11:29:07 -04:00
committed by SvyatoslavScherbina
parent c97124ea60
commit 09c9a60b30
@@ -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