Skip to content

Commit f834469

Browse files
lunakolySpace Team
authored andcommitted
[Commonizer] Drop EXPANDED_WITHOUT_ABBREVIATIONS
It was easier to fix abbreviation serialization so that all abbreviations are present than trying to dance around to replicate the way the commonizer (and K1?) handles them. See: `ClassifierCommonizationFromSourcesTest.testTypeAliases`.
1 parent a0677dd commit f834469

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

native/commonizer/src/org/jetbrains/kotlin/commonizer/metadata/CirSerializers.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,7 @@ private fun CirTypeAliasType.serializeTypeAliasType(
306306
expansion: TypeAliasExpansion
307307
): KmType = when (expansion) {
308308
ONLY_ABBREVIATIONS -> serializeAbbreviationType(context, expansion)
309-
EXPANDED_WITHOUT_ABBREVIATIONS -> serializeExpandedType(context, expansion)
310-
FOR_TOP_LEVEL_TYPE -> serializeExpandedType(context, EXPANDED_WITHOUT_ABBREVIATIONS).apply {
309+
FOR_TOP_LEVEL_TYPE -> serializeExpandedType(context, FOR_TOP_LEVEL_TYPE).apply {
311310
abbreviatedType = serializeAbbreviationType(context, expansion)
312311
}
313312
FOR_NESTED_TYPE -> serializeExpandedType(context, expansion).apply {
@@ -359,7 +358,6 @@ private inline fun Variance.serializeVariance(): KmVariance = when (this) {
359358
@Suppress("SpellCheckingInspection")
360359
private enum class TypeAliasExpansion {
361360
ONLY_ABBREVIATIONS,
362-
EXPANDED_WITHOUT_ABBREVIATIONS,
363361
FOR_TOP_LEVEL_TYPE,
364362
FOR_NESTED_TYPE
365363
}

0 commit comments

Comments
 (0)