[JS IR] Fix export of nested enums
Merge-request: KT-MR-5916 Merged-by: Ilya Goncharov <Ilya.Goncharov@jetbrains.com> ^KT-51211 fixed
This commit is contained in:
@@ -39,6 +39,14 @@ enum class Bar {
|
||||
fun bay() = name
|
||||
}
|
||||
|
||||
@JsExport
|
||||
class OuterClass {
|
||||
enum class NestedEnum {
|
||||
A,
|
||||
B;
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: test.js
|
||||
function box() {
|
||||
if (this["export_enum_class"].Foo.A !== this["export_enum_class"].Foo.A) return "fail1"
|
||||
@@ -82,5 +90,11 @@ function box() {
|
||||
if (this["export_enum_class"].Foo.A.ordinal !== 0) return "fail25"
|
||||
if (this["export_enum_class"].Foo.B.ordinal !== 1) return "fail26"
|
||||
|
||||
if (this["export_enum_class"].OuterClass.NestedEnum.A.name !== "A") return "fail27"
|
||||
if (this["export_enum_class"].OuterClass.NestedEnum.B.name !== "B") return "fail28"
|
||||
|
||||
if (this["export_enum_class"].OuterClass.NestedEnum.A.ordinal !== 0) return "fail29"
|
||||
if (this["export_enum_class"].OuterClass.NestedEnum.B.ordinal !== 1) return "fail30"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user