[JS IC TEST] Add test case for private top-level inline functions
This commit is contained in:
+5
@@ -40,6 +40,11 @@ public class InvalidationTestGenerated extends AbstractInvalidationTest {
|
|||||||
runTest("js/js.translator/testData/incremental/invalidation/fastPath2/");
|
runTest("js/js.translator/testData/incremental/invalidation/fastPath2/");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("privateInlineFunction1")
|
||||||
|
public void testPrivateInlineFunction1() throws Exception {
|
||||||
|
runTest("js/js.translator/testData/incremental/invalidation/privateInlineFunction1/");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("simple")
|
@TestMetadata("simple")
|
||||||
public void testSimple() throws Exception {
|
public void testSimple() throws Exception {
|
||||||
runTest("js/js.translator/testData/incremental/invalidation/simple/");
|
runTest("js/js.translator/testData/incremental/invalidation/simple/");
|
||||||
|
|||||||
+8
@@ -0,0 +1,8 @@
|
|||||||
|
|
||||||
|
private inline fun privateBar(z: Int, l: (Int) -> Int) = l(z - 3)
|
||||||
|
|
||||||
|
private inline fun privateFoo(x: Int, l: (Int) -> Int): Int {
|
||||||
|
return privateBar(x * 2, l)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun foo(x: Int, y: Int) = y - privateFoo(x) { it + it }
|
||||||
+8
@@ -0,0 +1,8 @@
|
|||||||
|
|
||||||
|
private inline fun privateBar(z: Int, l: (Int) -> Int) = l(z - 5)
|
||||||
|
|
||||||
|
private inline fun privateFoo(x: Int, l: (Int) -> Int): Int {
|
||||||
|
return privateBar(x * 2, l)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun foo(x: Int, y: Int) = y - privateFoo(x) { it + it }
|
||||||
+8
@@ -0,0 +1,8 @@
|
|||||||
|
STEP 0:
|
||||||
|
dependencies: stdlib
|
||||||
|
dirty: l1.kt
|
||||||
|
STEP 1:
|
||||||
|
dependencies: stdlib
|
||||||
|
modifications:
|
||||||
|
U : l1.kt.1 -> l1.kt
|
||||||
|
dirty: l1.kt
|
||||||
+2
@@ -0,0 +1,2 @@
|
|||||||
|
|
||||||
|
inline fun qux(x: Int, y: Int) = foo(x, y)
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
STEP 0:
|
||||||
|
dependencies: stdlib, lib1
|
||||||
|
dirty: l2.kt
|
||||||
|
|
||||||
|
STEP 1:
|
||||||
|
dependencies: stdlib, lib1
|
||||||
|
dirty:
|
||||||
+2
@@ -0,0 +1,2 @@
|
|||||||
|
|
||||||
|
fun box() = qux(4, 2)
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
STEP 0:
|
||||||
|
dependencies: stdlib, lib1, lib2
|
||||||
|
dirty: m.kt
|
||||||
|
|
||||||
|
STEP 1:
|
||||||
|
dependencies: stdlib, lib1, lib2
|
||||||
|
dirty:
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
MODULES: lib1, lib2, main
|
||||||
|
|
||||||
|
STEP 0:
|
||||||
|
libs: lib1, lib2, main
|
||||||
|
|
||||||
|
STEP 1:
|
||||||
|
libs: lib1, lib2, main
|
||||||
Reference in New Issue
Block a user