FIR: Refactor Cone types
- Get rid of AbbreviatedType
This commit is contained in:
@@ -109,16 +109,10 @@ abstract class ConeLookupTagBasedType : ConeKotlinType(), SimpleTypeMarker {
|
||||
abstract val lookupTag: ConeClassifierLookupTag
|
||||
}
|
||||
|
||||
sealed class ConeClassLikeType : ConeLookupTagBasedType() {
|
||||
abstract class ConeClassLikeType : ConeLookupTagBasedType() {
|
||||
abstract override val lookupTag: ConeClassLikeLookupTag
|
||||
}
|
||||
|
||||
abstract class ConeClassType : ConeClassLikeType()
|
||||
|
||||
abstract class ConeAbbreviatedType : ConeClassLikeType() {
|
||||
abstract val abbreviationLookupTag: ConeClassLikeLookupTag
|
||||
}
|
||||
|
||||
open class ConeFlexibleType(val lowerBound: ConeKotlinType, val upperBound: ConeKotlinType) : ConeKotlinType(),
|
||||
FlexibleTypeMarker {
|
||||
|
||||
|
||||
@@ -6,13 +6,15 @@
|
||||
package org.jetbrains.kotlin.fir.types.impl
|
||||
|
||||
import org.jetbrains.kotlin.fir.symbols.ConeClassLikeLookupTag
|
||||
import org.jetbrains.kotlin.fir.types.*
|
||||
import org.jetbrains.kotlin.fir.types.ConeClassLikeType
|
||||
import org.jetbrains.kotlin.fir.types.ConeKotlinTypeProjection
|
||||
import org.jetbrains.kotlin.fir.types.ConeNullability
|
||||
|
||||
open class ConeClassLikeTypeImpl(
|
||||
override val lookupTag: ConeClassLikeLookupTag,
|
||||
override val typeArguments: Array<out ConeKotlinTypeProjection>,
|
||||
isNullable: Boolean
|
||||
) : ConeClassType() {
|
||||
) : ConeClassLikeType() {
|
||||
override val nullability: ConeNullability = ConeNullability.create(isNullable)
|
||||
override fun equals(other: Any?): Boolean {
|
||||
if (this === other) return true
|
||||
@@ -34,15 +36,3 @@ open class ConeClassLikeTypeImpl(
|
||||
return result
|
||||
}
|
||||
}
|
||||
|
||||
class ConeAbbreviatedTypeImpl(
|
||||
override val abbreviationLookupTag: ConeClassLikeLookupTag,
|
||||
override val typeArguments: Array<out ConeKotlinTypeProjection>,
|
||||
isNullable: Boolean
|
||||
) : ConeAbbreviatedType() {
|
||||
override val lookupTag: ConeClassLikeLookupTag
|
||||
get() = abbreviationLookupTag
|
||||
|
||||
override val nullability: ConeNullability = ConeNullability.create(isNullable)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user