[FIR] fix memory leak via static ConeIntegerLiteralTypeImpl.COMPARABLE_TAG

This commit is contained in:
Ilya Kirillov
2022-09-30 15:50:42 +02:00
committed by teamcity
parent 607f15b55b
commit dd9ed02fbd
@@ -134,12 +134,10 @@ fun ConeKotlinType.approximateIntegerLiteralType(expectedType: ConeKotlinType? =
}
private object ConeIntegerLiteralTypeExtensions {
private val COMPARABLE_TAG = ConeClassLikeLookupTagImpl(StandardClassIds.Comparable)
fun createSupertypeList(type: ConeIntegerLiteralType): List<ConeClassLikeType> {
return listOf(
createClassLikeType(StandardClassIds.Number),
ConeClassLikeTypeImpl(COMPARABLE_TAG, arrayOf(ConeKotlinTypeProjectionIn(type)), false)
ConeClassLikeTypeImpl(ConeClassLikeLookupTagImpl(StandardClassIds.Comparable), arrayOf(ConeKotlinTypeProjectionIn(type)), false)
)
}