diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/export/extendingNonExportedType.kt b/compiler/testData/diagnostics/testsWithJsStdLib/export/extendingNonExportedType.kt index 214a37e01c1..0fd9757a54b 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/export/extendingNonExportedType.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/export/extendingNonExportedType.kt @@ -6,27 +6,27 @@ package foo open class NonExportedClass @JsExport -class ExportedClass : NonExportedClass() +class ExportedClass : NonExportedClass() interface NonExportedInterface @JsExport -class ExportedClass2 : NonExportedInterface +class ExportedClass2 : NonExportedInterface @JsExport open class ExportedGenericClass @JsExport -class ")!>ExportedClass3 : ExportedGenericClass() +class ExportedClass3 : ExportedGenericClass() @JsExport interface ExportedGenericInterface @JsExport -class ")!>ExportedClass4 : ExportedGenericInterface +class ExportedClass4 : ExportedGenericInterface @JsExport -enum class ExportedEnum : ExportedGenericInterface, NonExportedInterface { +enum class ExportedEnum : ExportedGenericInterface, NonExportedInterface { EXPORTED_ENUM_1, EXPORTED_ENUM_2 } \ No newline at end of file diff --git a/js/js.frontend/src/org/jetbrains/kotlin/js/resolve/diagnostics/JsExportDeclarationChecker.kt b/js/js.frontend/src/org/jetbrains/kotlin/js/resolve/diagnostics/JsExportDeclarationChecker.kt index 50dcbcefc77..06d957b0d36 100644 --- a/js/js.frontend/src/org/jetbrains/kotlin/js/resolve/diagnostics/JsExportDeclarationChecker.kt +++ b/js/js.frontend/src/org/jetbrains/kotlin/js/resolve/diagnostics/JsExportDeclarationChecker.kt @@ -141,15 +141,6 @@ object JsExportDeclarationChecker : DeclarationChecker { // Covered by ENUM_CLASS return } - - val supertypes = descriptor.defaultType.supertypes() - val isEnum = supertypes.any { KotlinBuiltIns.isEnum(it) } - - for (superType in supertypes) { - if (!superType.isExportable(bindingContext) && !(KotlinBuiltIns.isComparable(superType) && isEnum)) { - trace.report(ErrorsJs.NON_EXPORTABLE_TYPE.on(declaration, "super", superType)) - } - } } } }