[JS IR] Make JsExport not fail on companion objects (KT-37829)
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user