[JS IR] Make JsExport not fail on companion objects (KT-37829)

This commit is contained in:
Svyatoslav Kuzmich
2020-10-07 08:38:27 +03:00
parent 9f716ba37c
commit 5e5712afbb
4 changed files with 22 additions and 7 deletions
@@ -49,5 +49,11 @@ declare namespace JS_TESTS {
foo(): number;
};
function takesO(o: typeof foo.O): number;
class KT_37829 {
constructor();
readonly Companion: {
readonly x: number;
};
}
}
}
@@ -93,4 +93,12 @@ object O {
}
fun takesO(o: O): Int =
O.x + O.foo()
O.x + O.foo()
// Test that JsExport with companion object compiles without error.
// Usage is not supported yet.
class KT_37829 {
companion object {
val x = 10
}
}