Sanitize names for backing fields and private declarations in JS BE

See KT-1816
This commit is contained in:
Alexey Andreev
2017-09-07 11:52:08 +03:00
parent 206369c088
commit 502c51ccff
4 changed files with 58 additions and 1 deletions
@@ -0,0 +1,17 @@
// EXPECTED_REACHABLE_NODES: 1000
open class A {
private val `.` = "A"
private val `;` = "B"
private fun `@`() = "C"
private fun `#`() = "D"
fun foo() = `.` + `;` + `@`() + `#`()
}
fun box(): String {
val x = A().foo()
if (x != "ABCD") return "fail: $x"
return "OK"
}