From 2f61a2f56f55a55c8a11efde94bc5984418a8cab Mon Sep 17 00:00:00 2001 From: Mikhail Glukhikh Date: Tue, 8 Sep 2020 16:16:22 +0300 Subject: [PATCH] [FIR] Provide correct comparison of captured types --- .../cones/src/org/jetbrains/kotlin/fir/types/ConeTypes.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/compiler/fir/cones/src/org/jetbrains/kotlin/fir/types/ConeTypes.kt b/compiler/fir/cones/src/org/jetbrains/kotlin/fir/types/ConeTypes.kt index efc28bda8b2..bb289a27b6f 100644 --- a/compiler/fir/cones/src/org/jetbrains/kotlin/fir/types/ConeTypes.kt +++ b/compiler/fir/cones/src/org/jetbrains/kotlin/fir/types/ConeTypes.kt @@ -186,7 +186,8 @@ data class ConeCapturedType( other as ConeCapturedType if (lowerType != other.lowerType) return false - if (constructor != other.constructor) return false + if (constructor.projection != other.constructor.projection) return false + if (constructor.typeParameterMarker != other.constructor.typeParameterMarker) return false if (captureStatus != other.captureStatus) return false if (nullability != other.nullability) return false @@ -196,7 +197,8 @@ data class ConeCapturedType( override fun hashCode(): Int { var result = 0 result = 31 * result + (lowerType?.hashCode() ?: 0) - result = 31 * result + constructor.hashCode() + result = 31 * result + constructor.projection.hashCode() + result = 31 * result + constructor.typeParameterMarker.hashCode() result = 31 * result + captureStatus.hashCode() result = 31 * result + nullability.hashCode() return result