[Commonizer] Move fqNameWithTypeParameters extension val into CirType
This commit is contained in:
@@ -12,7 +12,9 @@ import org.jetbrains.kotlin.name.FqName
|
|||||||
import org.jetbrains.kotlin.types.AbbreviatedType
|
import org.jetbrains.kotlin.types.AbbreviatedType
|
||||||
import org.jetbrains.kotlin.types.Variance
|
import org.jetbrains.kotlin.types.Variance
|
||||||
|
|
||||||
sealed class CirType
|
sealed class CirType {
|
||||||
|
abstract val fqNameWithTypeParameters: String
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* All attributes except for [expandedTypeConstructorId] are read from the abbreviation type: [AbbreviatedType.abbreviation].
|
* All attributes except for [expandedTypeConstructorId] are read from the abbreviation type: [AbbreviatedType.abbreviation].
|
||||||
@@ -33,7 +35,6 @@ abstract class CirSimpleType : CirType() {
|
|||||||
abstract val isMarkedNullable: Boolean
|
abstract val isMarkedNullable: Boolean
|
||||||
abstract val isDefinitelyNotNullType: Boolean
|
abstract val isDefinitelyNotNullType: Boolean
|
||||||
abstract val expandedTypeConstructorId: CirTypeConstructorId
|
abstract val expandedTypeConstructorId: CirTypeConstructorId
|
||||||
abstract val fqNameWithTypeParameters: String
|
|
||||||
|
|
||||||
inline val isClassOrTypeAlias: Boolean get() = (kind == CLASS || kind == TYPE_ALIAS)
|
inline val isClassOrTypeAlias: Boolean get() = (kind == CLASS || kind == TYPE_ALIAS)
|
||||||
}
|
}
|
||||||
@@ -53,10 +54,7 @@ data class CirTypeConstructorId(val fqName: FqName, val numberOfTypeParameters:
|
|||||||
|
|
||||||
data class CirTypeProjection(val projectionKind: Variance, val isStarProjection: Boolean, val type: CirType)
|
data class CirTypeProjection(val projectionKind: Variance, val isStarProjection: Boolean, val type: CirType)
|
||||||
|
|
||||||
data class CirFlexibleType(val lowerBound: CirSimpleType, val upperBound: CirSimpleType) : CirType()
|
data class CirFlexibleType(val lowerBound: CirSimpleType, val upperBound: CirSimpleType) : CirType() {
|
||||||
|
override val fqNameWithTypeParameters: String
|
||||||
val CirType.fqNameWithTypeParameters: String
|
get() = lowerBound.fqNameWithTypeParameters
|
||||||
get() = when (this) {
|
}
|
||||||
is CirSimpleType -> fqNameWithTypeParameters
|
|
||||||
is CirFlexibleType -> lowerBound.fqNameWithTypeParameters
|
|
||||||
}
|
|
||||||
|
|||||||
-1
@@ -6,7 +6,6 @@
|
|||||||
package org.jetbrains.kotlin.descriptors.commonizer.core
|
package org.jetbrains.kotlin.descriptors.commonizer.core
|
||||||
|
|
||||||
import org.jetbrains.kotlin.descriptors.commonizer.cir.CirType
|
import org.jetbrains.kotlin.descriptors.commonizer.cir.CirType
|
||||||
import org.jetbrains.kotlin.descriptors.commonizer.cir.fqNameWithTypeParameters
|
|
||||||
import org.jetbrains.kotlin.descriptors.commonizer.mergedtree.*
|
import org.jetbrains.kotlin.descriptors.commonizer.mergedtree.*
|
||||||
import org.jetbrains.kotlin.descriptors.commonizer.utils.CommonizedGroupMap
|
import org.jetbrains.kotlin.descriptors.commonizer.utils.CommonizedGroupMap
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user