From b8ff04004ad9e675b48d690a09a2f64da2420f78 Mon Sep 17 00:00:00 2001 From: Kirill Rakhman Date: Tue, 9 Jan 2024 17:14:24 +0100 Subject: [PATCH] [FIR] Make EnhancedTypeForWarningAttribute a data class (cherry picked from commit 76898ddb0f0a7403f952079eedf59019d5561698) --- .../EnhancedTypeForWarningAttribute.kt | 20 +------------------ 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/enhancement/EnhancedTypeForWarningAttribute.kt b/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/enhancement/EnhancedTypeForWarningAttribute.kt index baff229ffdc..0edcf4a51bd 100644 --- a/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/enhancement/EnhancedTypeForWarningAttribute.kt +++ b/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/enhancement/EnhancedTypeForWarningAttribute.kt @@ -10,7 +10,7 @@ import org.jetbrains.kotlin.fir.resolve.substitution.AbstractConeSubstitutor import org.jetbrains.kotlin.fir.types.* import kotlin.reflect.KClass -class EnhancedTypeForWarningAttribute( +data class EnhancedTypeForWarningAttribute( override val coneType: ConeKotlinType, val isDeprecation: Boolean, ) : ConeAttributeWithConeType() { @@ -29,24 +29,6 @@ class EnhancedTypeForWarningAttribute( override val implementsEquality: Boolean get() = true - - override fun equals(other: Any?): Boolean { - if (this === other) return true - if (javaClass != other?.javaClass) return false - - other as EnhancedTypeForWarningAttribute - - if (coneType != other.coneType) return false - if (isDeprecation != other.isDeprecation) return false - - return true - } - - override fun hashCode(): Int { - var result = coneType.hashCode() - result = 31 * result + isDeprecation.hashCode() - return result - } } val ConeAttributes.enhancedTypeForWarning: EnhancedTypeForWarningAttribute? by ConeAttributes.attributeAccessor()