[FIR] Make EnhancedTypeForWarningAttribute a data class

(cherry picked from commit 76898ddb0f)
This commit is contained in:
Kirill Rakhman
2024-01-09 17:14:24 +01:00
committed by Space Team
parent d74b5c59fb
commit b8ff04004a
@@ -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<EnhancedTypeForWarningAttribute>() {
@@ -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<EnhancedTypeForWarningAttribute>()