[K/JS] Support companion objects in external and exported declarations
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
// TARGET_BACKEND: JS_IR
|
||||
// TARGET_BACKEND: JS_IR_ES6
|
||||
// EXPECTED_REACHABLE_NODES: 1238
|
||||
// ES_MODULES
|
||||
// FILE: bar.kt
|
||||
@file:JsModule("./interfacesWithCompanion.mjs")
|
||||
package bar
|
||||
|
||||
external interface Bar {
|
||||
companion object {
|
||||
fun ok(): String
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
import bar.Bar
|
||||
|
||||
fun box(): String {
|
||||
return Bar.ok()
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
export const Bar = {
|
||||
ok() { return "OK" }
|
||||
};
|
||||
Reference in New Issue
Block a user