From 72ce4eb5ee7a07f51c22366a1dfe6a7a892dc9bf Mon Sep 17 00:00:00 2001 From: Mikhail Zarechenskiy Date: Sun, 22 Mar 2020 23:06:49 +0300 Subject: [PATCH] Minor, replace fields with getters to avoid leaking "this" inspection --- .../src/org/jetbrains/kotlin/types/TypeApproximator.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/resolution/src/org/jetbrains/kotlin/types/TypeApproximator.kt b/compiler/resolution/src/org/jetbrains/kotlin/types/TypeApproximator.kt index 0b12c3cf5bf..199d569d1dd 100644 --- a/compiler/resolution/src/org/jetbrains/kotlin/types/TypeApproximator.kt +++ b/compiler/resolution/src/org/jetbrains/kotlin/types/TypeApproximator.kt @@ -131,8 +131,8 @@ abstract class AbstractTypeApproximator(val ctx: TypeSystemInferenceExtensionCon private val cacheForIncorporationConfigToSuperDirection = ConcurrentHashMap() private val cacheForIncorporationConfigToSubtypeDirection = ConcurrentHashMap() - private val referenceApproximateToSuperType = this::approximateSimpleToSuperType - private val referenceApproximateToSubType = this::approximateSimpleToSubType + private val referenceApproximateToSuperType get() = this::approximateSimpleToSuperType + private val referenceApproximateToSubType get() = this::approximateSimpleToSubType companion object { const val CACHE_FOR_INCORPORATION_MAX_SIZE = 500