From 6f3985be47a3249b471267dade39cf9fe86e2925 Mon Sep 17 00:00:00 2001 From: Ilya Goncharov Date: Wed, 17 Nov 2021 20:12:35 +0300 Subject: [PATCH] [JS IR] Add test on frontend check with enum exportness ^KT-49754 fixed --- .../export/extendingNonExportedType.kt | 6 ++++++ .../export/extendingNonExportedType.txt | 19 +++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/export/extendingNonExportedType.kt b/compiler/testData/diagnostics/testsWithJsStdLib/export/extendingNonExportedType.kt index 985971cf5ac..b0624dbe8f3 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/export/extendingNonExportedType.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/export/extendingNonExportedType.kt @@ -24,3 +24,9 @@ interface ExportedGenericInterface @JsExport class ")!>ExportedClass4 : ExportedGenericInterface + +@JsExport +enum class ExportedEnum : NonExportedInterface { + EXPORTED_ENUM_1, + EXPORTED_ENUM_2 +} \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/export/extendingNonExportedType.txt b/compiler/testData/diagnostics/testsWithJsStdLib/export/extendingNonExportedType.txt index 773f74f1aa0..af9e81567f5 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/export/extendingNonExportedType.txt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/export/extendingNonExportedType.txt @@ -30,6 +30,25 @@ package foo { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } + @kotlin.js.JsExport public final enum class ExportedEnum : kotlin.Enum, foo.NonExportedInterface { + enum entry EXPORTED_ENUM_1 + + enum entry EXPORTED_ENUM_2 + + private constructor ExportedEnum() + public final override /*1*/ /*fake_override*/ val name: kotlin.String + public final override /*1*/ /*fake_override*/ val ordinal: kotlin.Int + protected final override /*1*/ /*fake_override*/ fun clone(): kotlin.Any + public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: foo.ExportedEnum): kotlin.Int + public final override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public final override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String + + // Static members + public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): foo.ExportedEnum + public final /*synthesized*/ fun values(): kotlin.Array + } + @kotlin.js.JsExport public open class ExportedGenericClass { public constructor ExportedGenericClass() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean