[JS IR] Don't parse/print JS code in js() call twice

#KT-51327 Fixed
This commit is contained in:
Sergej Jaskiewicz
2022-07-27 22:36:45 +02:00
committed by Space
parent a90c4d5dd5
commit a152bc2313
15 changed files with 75 additions and 72 deletions
+2 -3
View File
@@ -1,8 +1,7 @@
// EXPECTED_REACHABLE_NODES: 1283
package foo
// In the IR backend the injected JS code is outlined.
// CHECK_CONTAINS_NO_CALLS: test TARGET_BACKENDS=JS
// CHECK_CONTAINS_NO_CALLS: test
// CHECK_NOT_CALLED_IN_SCOPE: function=sum scope=test
internal inline fun sum(x: Int, y: Int): Int = js("var a = x; a + y")
@@ -22,4 +21,4 @@ fun box(): String {
assertEquals(8, test(1, 3))
return "OK"
}
}