From 1eb0c606da5fd958da8ef87bb0186f6a5de4254a Mon Sep 17 00:00:00 2001 From: "Denis.Zharkov" Date: Wed, 9 Aug 2023 11:55:44 +0200 Subject: [PATCH] Add clarification comments to some shouldKeepTypeVariableBasedType impls ^KT-61090 Related --- .../org/jetbrains/kotlin/types/TypeApproximatorConfiguration.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/resolution.common/src/org/jetbrains/kotlin/types/TypeApproximatorConfiguration.kt b/compiler/resolution.common/src/org/jetbrains/kotlin/types/TypeApproximatorConfiguration.kt index f9d5a5b0c10..35dcca9a0a5 100644 --- a/compiler/resolution.common/src/org/jetbrains/kotlin/types/TypeApproximatorConfiguration.kt +++ b/compiler/resolution.common/src/org/jetbrains/kotlin/types/TypeApproximatorConfiguration.kt @@ -65,6 +65,7 @@ open class TypeApproximatorConfiguration { override val integerLiteralConstantType: Boolean get() = true override val intersectionTypesInContravariantPositions: Boolean get() = true + // Probably, it's worth thinking of returning true only for delegated property accessors, see KT-61090 override fun shouldKeepTypeVariableBasedType(marker: TypeVariableTypeConstructorMarker, isK2: Boolean): Boolean = isK2 } @@ -75,6 +76,7 @@ open class TypeApproximatorConfiguration { override val integerLiteralConstantType: Boolean get() = true override val intersectionTypesInContravariantPositions: Boolean get() = true + // Probably, it's worth thinking of returning true only for delegated property accessors, see KT-61090 override fun shouldKeepTypeVariableBasedType(marker: TypeVariableTypeConstructorMarker, isK2: Boolean): Boolean = isK2 object SaveAnonymousTypes : PublicDeclaration(localTypes = false, anonymous = false)