Minor fix of around flexible and not-null FIR types (by semoro)
This commit is contained in:
@@ -107,7 +107,7 @@ abstract class ConeTypeParameterType : ConeLookupTagBasedType() {
|
||||
|
||||
|
||||
|
||||
class ConeFlexibleType(val lowerBound: ConeLookupTagBasedType, val upperBound: ConeLookupTagBasedType) : ConeKotlinType(),
|
||||
class ConeFlexibleType(val lowerBound: ConeKotlinType, val upperBound: ConeKotlinType) : ConeKotlinType(),
|
||||
FlexibleTypeMarker {
|
||||
override val typeArguments: Array<out ConeKotlinTypeProjection>
|
||||
get() = emptyArray()
|
||||
@@ -116,6 +116,9 @@ class ConeFlexibleType(val lowerBound: ConeLookupTagBasedType, val upperBound: C
|
||||
get() = lowerBound.nullability.takeIf { it == upperBound.nullability } ?: ConeNullability.UNKNOWN
|
||||
}
|
||||
|
||||
fun ConeKotlinType.upperBoundIfFlexible() = (this as? ConeFlexibleType)?.upperBound ?: this
|
||||
fun ConeKotlinType.lowerBoundIfFlexible() = (this as? ConeFlexibleType)?.lowerBound ?: this
|
||||
|
||||
class ConeCapturedTypeConstructor(val projection: ConeKotlinTypeProjection, var supertypes: List<ConeKotlinType>? = null) :
|
||||
TypeConstructorMarker {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user