[JS IR] Fix kotlin.js.js with complex constant expressions

Use IR interpreter to evaluate complex constexprs
This commit is contained in:
Svyatoslav Kuzmich
2021-02-15 17:25:50 +03:00
parent 93289aa899
commit 6bd34db725
8 changed files with 46 additions and 12 deletions
@@ -0,0 +1,13 @@
// EXPECTED_REACHABLE_NODES: 1282
package foo
const val x = '2'
const val y = '+'
const val z = '3'
fun box(): String {
if (js(x.toString() + z) !== 23) return "Fail 1"
if (js(x.toString() + y + z) !== 5) return "Fail 2"
return "OK"
}