[JS IR] Make tests that use directives pass with IR BE

This commit is contained in:
Sergej Jaskiewicz
2021-10-04 20:44:06 +03:00
committed by Space
parent a359e503fb
commit 65d40c2253
101 changed files with 415 additions and 217 deletions
@@ -1,16 +1,16 @@
// EXPECTED_REACHABLE_NODES: 1285
package foo
// CHECK_NOT_CALLED_IN_SCOPE: scope=multiply function=multiply$lambda
// CHECK_CONTAINS_NO_CALLS: myMultiply except=A;imul
internal class A(val a: Int)
internal inline fun <T, R> with2(receiver: T, arg1: R, arg2: R, f: T.(R, R) -> R): R = receiver.f(arg1, arg2)
internal fun multiply(a: Int, b: Int, c: Int): Int = with2(A(a), b, c) { x, y -> a*x*y }
internal fun myMultiply(a: Int, b: Int, c: Int): Int = with2(A(a), b, c) { x, y -> a*x*y }
fun box(): String {
assertEquals(105, multiply(3, 5, 7))
assertEquals(105, myMultiply(3, 5, 7))
return "OK"
}