[JS IR] Add a test with an object in inline function for JS IC
This commit is contained in:
committed by
Space
parent
7a8250cf17
commit
ea7ce55082
+5
@@ -165,6 +165,11 @@ public class InvalidationTestGenerated extends AbstractInvalidationTest {
|
|||||||
runTest("js/js.translator/testData/incremental/invalidation/inlineFunctionDefaultParams/");
|
runTest("js/js.translator/testData/incremental/invalidation/inlineFunctionDefaultParams/");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineFunctionWithObject")
|
||||||
|
public void testInlineFunctionWithObject() throws Exception {
|
||||||
|
runTest("js/js.translator/testData/incremental/invalidation/inlineFunctionWithObject/");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("jsCode")
|
@TestMetadata("jsCode")
|
||||||
public void testJsCode() throws Exception {
|
public void testJsCode() throws Exception {
|
||||||
runTest("js/js.translator/testData/incremental/invalidation/jsCode/");
|
runTest("js/js.translator/testData/incremental/invalidation/jsCode/");
|
||||||
|
|||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
interface DemoInterface {
|
||||||
|
fun doAnything(): Int
|
||||||
|
}
|
||||||
Vendored
+3
@@ -0,0 +1,3 @@
|
|||||||
|
STEP 0:
|
||||||
|
added file: l1.kt
|
||||||
|
STEP 1:
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
inline fun foo(): DemoInterface {
|
||||||
|
return object : DemoInterface {
|
||||||
|
override fun doAnything(): Int {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
inline fun foo(): DemoInterface {
|
||||||
|
return object : DemoInterface {
|
||||||
|
override fun doAnything(): Int {
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Vendored
+10
@@ -0,0 +1,10 @@
|
|||||||
|
STEP 0:
|
||||||
|
dependencies: lib1
|
||||||
|
modifications:
|
||||||
|
U : l2.0.kt -> l2.kt
|
||||||
|
added file: l2.kt
|
||||||
|
STEP 1:
|
||||||
|
dependencies: lib1
|
||||||
|
modifications:
|
||||||
|
U : l2.1.kt -> l2.kt
|
||||||
|
modified ir: l2.kt
|
||||||
+6
@@ -0,0 +1,6 @@
|
|||||||
|
fun box(stepId: Int): String {
|
||||||
|
if (foo().doAnything() != stepId) {
|
||||||
|
return "Fail"
|
||||||
|
}
|
||||||
|
return "OK"
|
||||||
|
}
|
||||||
Vendored
+6
@@ -0,0 +1,6 @@
|
|||||||
|
STEP 0:
|
||||||
|
dependencies: lib1, lib2
|
||||||
|
added file: m.kt
|
||||||
|
STEP 1:
|
||||||
|
dependencies: lib1, lib2
|
||||||
|
updated imports: m.kt
|
||||||
+8
@@ -0,0 +1,8 @@
|
|||||||
|
MODULES: lib1, lib2, main
|
||||||
|
|
||||||
|
STEP 0:
|
||||||
|
libs: lib1, lib2, main
|
||||||
|
dirty js: lib1, lib2, main
|
||||||
|
STEP 1:
|
||||||
|
libs: lib1, lib2, main
|
||||||
|
dirty js: lib2, main
|
||||||
Reference in New Issue
Block a user