JS: declare names for native declaration in root scope, to avoid clashing between inner names and global native names. Fix KT-14806

This commit is contained in:
Alexey Andreev
2016-11-24 17:34:34 +03:00
parent 9c9b23a0fb
commit b634c2cbe3
7 changed files with 48 additions and 1 deletions
@@ -20,7 +20,7 @@ fun box(): String {
assertEquals("A::foo", f())
assertEquals("B::boo", g())
val fs = js("B\$far\$lambda").toString() as String
val fs: String = js("B\$far\$lambda").toString()
val gs = (js("B\$gar\$lambda").toString() as String).replaceAll("boo", "foo").replaceAll("gar", "far")
assertEquals(gs, fs)