[K/JS] Rework symbol hash calculation to make IC works with @JsExport and @JsName changes

This commit is contained in:
Artem Kobzar
2023-11-27 13:49:56 +00:00
committed by Space Team
parent f7d87f6d70
commit 6615b77213
50 changed files with 569 additions and 17 deletions
@@ -0,0 +1,34 @@
fun box(step: Int): String {
val x = TestClass()
if (x.bar() != "Bar") return "Fail bar in Bar"
if (x.foo() != "FooImpl") return "Fail overridden foo in FooBarImpl"
when (step) {
0 -> {
if (x.default() != "Default") return "Fail default in Foo"
}
1 -> {
if (x.default() != "TestClass") return "Fail default in TestClass"
}
2 -> {
if (x.asDynamic()._foo_() != "FooImpl") return "Fail overridden foo in FooBarImpl with @JsName"
}
3 -> {
if (x.asDynamic()._foo_() != "FooImpl") return "Fail overridden foo in FooBarImpl with @JsName"
if (x.asDynamic()._default_() != "TestClass") return "Fail default in TestClass with @JsName"
}
4 -> {
if (x.asDynamic()._foo_() != "FooImpl") return "Fail overridden foo in FooBarImpl with @JsName"
if (x.asDynamic()._default_() != "TestClass") return "Fail default in TestClass with @JsName"
if (x.asDynamic()._bar_() != "Bar") return "Fail bar in Bar with @JsName"
}
5 -> {
if (x.asDynamic()._foo_() != "FooImpl") return "Fail overridden foo in FooBarImpl with @JsName"
if (x.asDynamic()._default_() != "Default") return "Fail default in Default with @JsName"
if (x.asDynamic()._bar_() != "Bar") return "Fail bar in Bar with @JsName"
}
}
return "OK"
}
@@ -0,0 +1,18 @@
STEP 0:
dependencies: lib1, lib2, lib3
added file: m.kt
STEP 1:
dependencies: lib1, lib2, lib3
updated imports: m.kt
STEP 2:
dependencies: lib1, lib2, lib3
updated imports: m.kt
STEP 3:
dependencies: lib1, lib2, lib3
updated imports: m.kt
STEP 4:
dependencies: lib1, lib2, lib3
updated imports: m.kt
STEP 5:
dependencies: lib1, lib2, lib3
updated imports: m.kt