[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:
+8
-8
@@ -61,18 +61,18 @@ class ExportModelGenerator(
|
||||
return when (candidate) {
|
||||
is IrSimpleFunction -> exportFunction(candidate)
|
||||
is IrProperty -> exportProperty(candidate)
|
||||
is IrClass -> {
|
||||
if (candidate.isEnumClass) {
|
||||
exportEnumClass(candidate)
|
||||
} else {
|
||||
exportClass(candidate)
|
||||
}
|
||||
}
|
||||
is IrClass -> exportClass(candidate)
|
||||
is IrField -> null
|
||||
else -> error("Can't export declaration $candidate")
|
||||
}
|
||||
}
|
||||
|
||||
private fun exportClass(candidate: IrClass) = if (candidate.isEnumClass) {
|
||||
exportEnumClass(candidate)
|
||||
} else {
|
||||
exportOrdinaryClass(candidate)
|
||||
}
|
||||
|
||||
private fun exportFunction(function: IrSimpleFunction): ExportedDeclaration? {
|
||||
return when (val exportability = functionExportability(function)) {
|
||||
is Exportability.NotNeeded -> null
|
||||
@@ -221,7 +221,7 @@ class ExportModelGenerator(
|
||||
return Exportability.Allowed
|
||||
}
|
||||
|
||||
private fun exportClass(
|
||||
private fun exportOrdinaryClass(
|
||||
klass: IrClass
|
||||
): ExportedDeclaration? {
|
||||
when (val exportability = classExportability(klass)) {
|
||||
|
||||
Reference in New Issue
Block a user