From dd9ed02fbd45422a0dce1785a9787eb6597a1afe Mon Sep 17 00:00:00 2001 From: Ilya Kirillov Date: Fri, 30 Sep 2022 15:50:42 +0200 Subject: [PATCH] [FIR] fix memory leak via static ConeIntegerLiteralTypeImpl.COMPARABLE_TAG --- .../jetbrains/kotlin/fir/types/ConeIntegerLiteralTypeImpl.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/types/ConeIntegerLiteralTypeImpl.kt b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/types/ConeIntegerLiteralTypeImpl.kt index 83f7ccf52a7..69e2c8917e2 100644 --- a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/types/ConeIntegerLiteralTypeImpl.kt +++ b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/types/ConeIntegerLiteralTypeImpl.kt @@ -134,12 +134,10 @@ fun ConeKotlinType.approximateIntegerLiteralType(expectedType: ConeKotlinType? = } private object ConeIntegerLiteralTypeExtensions { - private val COMPARABLE_TAG = ConeClassLikeLookupTagImpl(StandardClassIds.Comparable) - fun createSupertypeList(type: ConeIntegerLiteralType): List { return listOf( createClassLikeType(StandardClassIds.Number), - ConeClassLikeTypeImpl(COMPARABLE_TAG, arrayOf(ConeKotlinTypeProjectionIn(type)), false) + ConeClassLikeTypeImpl(ConeClassLikeLookupTagImpl(StandardClassIds.Comparable), arrayOf(ConeKotlinTypeProjectionIn(type)), false) ) }