[JS IR] Add IC test for JsModule annptation

^KT-43455
This commit is contained in:
Alexander Korepanov
2022-08-30 22:42:09 +02:00
committed by Space
parent 09add47777
commit 752ce887b2
8 changed files with 44 additions and 0 deletions
@@ -0,0 +1,5 @@
@file:JsNonModule
@file:JsModule("lib1")
external open class ObjectA {
open var callable: (a: Any, b: Any, c: Any, d: dynamic, e: Any, f: Any) -> Unit
}
@@ -0,0 +1,4 @@
//@file:JsNonModule
//@file:JsModule("lib1")
external open class ObjectB<T1, T2>(a: T1 = definedExternally, b: T2 = definedExternally, c: Number = definedExternally) : ObjectA
@@ -0,0 +1,4 @@
@file:JsNonModule
@file:JsModule("lib1")
external open class ObjectB<T1, T2>(a: T1 = definedExternally, b: T2 = definedExternally, c: Number = definedExternally) : ObjectA
@@ -0,0 +1,8 @@
STEP 0:
modifications:
U : ObjectB.0.kt -> ObjectB.kt
added file: ObjectA.kt, ObjectB.kt
STEP 1:
modifications:
U : ObjectB.1.kt -> ObjectB.kt
modified ir: ObjectB.kt
@@ -0,0 +1,5 @@
fun test(x: ObjectB<String, Int>?) = if (x == null) "OK" else "fail"
fun box(stepId: Int): String {
return test(null)
}
@@ -0,0 +1,5 @@
STEP 0:
dependencies: lib1
added file: m.kt
STEP 1:
dependencies: lib1
@@ -0,0 +1,8 @@
MODULES: lib1, main
STEP 0:
libs: lib1, main
dirty js: lib1, main
STEP 1:
libs: lib1, main
dirty js: lib1