[FIR] Provide correct comparison of captured types

This commit is contained in:
Mikhail Glukhikh
2020-09-08 16:16:22 +03:00
parent b5f8fec213
commit 2f61a2f56f
@@ -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