[FIR] Don't create delegating super constructor call to kotlin.Enum for enums
This commit is contained in:
+5
-5
@@ -387,9 +387,9 @@ class DeclarationsConverter(
|
||||
|
||||
val selfType = null.toDelegatedSelfType(firClass)
|
||||
|
||||
val defaultDelegatedSuperTypeRef = when {
|
||||
modifiers.isEnum() && (classKind == ClassKind.ENUM_CLASS) ->
|
||||
FirResolvedTypeRefImpl(
|
||||
when {
|
||||
modifiers.isEnum() && (classKind == ClassKind.ENUM_CLASS) -> {
|
||||
superTypeRefs += FirResolvedTypeRefImpl(
|
||||
source = null,
|
||||
ConeClassLikeTypeImpl(
|
||||
implicitEnumType.type.lookupTag,
|
||||
@@ -397,12 +397,12 @@ class DeclarationsConverter(
|
||||
isNullable = false
|
||||
)
|
||||
)
|
||||
}
|
||||
modifiers.isAnnotation() && (classKind == ClassKind.ANNOTATION_CLASS) -> {
|
||||
superTypeRefs += implicitAnnotationType
|
||||
implicitAnyType
|
||||
}
|
||||
else -> implicitAnyType
|
||||
}
|
||||
val defaultDelegatedSuperTypeRef = implicitAnyType
|
||||
|
||||
superTypeRefs.ifEmpty { superTypeRefs += defaultDelegatedSuperTypeRef }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user