Fix handling non-ES5 identifiers in JS
When a Kotlin identifiers contains non-ES5 chars, JS BE either reports error (for published declarations) or mangles name (for non-published ones). The old approach relied on wrong assuption that Java identifier = ES identifier. However, that's not true. This commit introduces functions that check identifiers according to ES5.1 spec rather than using Character.isIdentifierStart[Part] See KT-17476
This commit is contained in:
committed by
Alexey Andreev
parent
24c0a1e7ce
commit
a0ddbf0e9b
@@ -23,9 +23,9 @@ fun test3(): String {
|
||||
}
|
||||
|
||||
fun test4(): String {
|
||||
val `()` = "OK"
|
||||
fun `[]`() = `()`
|
||||
return `[]`()
|
||||
val `1(¢)` = "OK"
|
||||
fun `[£]`() = `1(¢)`
|
||||
return `[£]`()
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
|
||||
Reference in New Issue
Block a user