ConeIntegerLiteralType: extract COMPARABLE_TAG
This commit is contained in:
@@ -41,7 +41,7 @@ class ConeIntegerLiteralTypeImpl : ConeIntegerLiteralType {
|
|||||||
override val supertypes: List<ConeClassLikeType> by lazy {
|
override val supertypes: List<ConeClassLikeType> by lazy {
|
||||||
listOf(
|
listOf(
|
||||||
NUMBER_TYPE,
|
NUMBER_TYPE,
|
||||||
ConeClassLikeTypeImpl(ConeClassLikeLookupTagImpl(StandardClassIds.Comparable), arrayOf(ConeKotlinTypeProjectionOut(this)), false)
|
ConeClassLikeTypeImpl(COMPARABLE_TAG, arrayOf(ConeKotlinTypeProjectionOut(this)), false)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,6 +63,8 @@ class ConeIntegerLiteralTypeImpl : ConeIntegerLiteralType {
|
|||||||
private val BYTE_RANGE = Byte.MIN_VALUE.toLong()..Byte.MAX_VALUE.toLong()
|
private val BYTE_RANGE = Byte.MIN_VALUE.toLong()..Byte.MAX_VALUE.toLong()
|
||||||
private val SHORT_RANGE = Short.MIN_VALUE.toLong()..Short.MAX_VALUE.toLong()
|
private val SHORT_RANGE = Short.MIN_VALUE.toLong()..Short.MAX_VALUE.toLong()
|
||||||
|
|
||||||
|
private val COMPARABLE_TAG = ConeClassLikeLookupTagImpl(StandardClassIds.Comparable)
|
||||||
|
|
||||||
fun findCommonSuperType(types: Collection<SimpleTypeMarker>): SimpleTypeMarker? {
|
fun findCommonSuperType(types: Collection<SimpleTypeMarker>): SimpleTypeMarker? {
|
||||||
return findCommonSuperTypeOrIntersectionType(types, Mode.COMMON_SUPER_TYPE)
|
return findCommonSuperTypeOrIntersectionType(types, Mode.COMMON_SUPER_TYPE)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user