From 8c795462e1c96cf2b16191dafbed6d59673f0002 Mon Sep 17 00:00:00 2001 From: Nikita Bobko Date: Wed, 26 Jul 2023 10:51:31 +0200 Subject: [PATCH] Effective modality cleanup. Drop unnecessary @Suppress and `final` They were needed as a temporary migration in scope of KT-58587 Now the bootstrap and IDE include KT-58587 patch, so @Suppress and `final` are no longer needed --- .../kotlin/fir/backend/IrBuiltInsOverFir.kt | 45 +++++++------------ 1 file changed, 15 insertions(+), 30 deletions(-) diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/IrBuiltInsOverFir.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/IrBuiltInsOverFir.kt index 5429f71ddb7..d58bba08a1e 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/IrBuiltInsOverFir.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/IrBuiltInsOverFir.kt @@ -375,29 +375,18 @@ class IrBuiltInsOverFir( override val ieee754equalsFunByOperandType: MutableMap get() = _ieee754equalsFunByOperandType - @Suppress("RedundantModalityModifier") // Explicit `final` keyword can be dropped after bootstrap update - final override var eqeqeqSymbol: IrSimpleFunctionSymbol private set - @Suppress("RedundantModalityModifier") // Explicit `final` keyword can be dropped after bootstrap update - final override var eqeqSymbol: IrSimpleFunctionSymbol private set - @Suppress("RedundantModalityModifier") // Explicit `final` keyword can be dropped after bootstrap update - final override var throwCceSymbol: IrSimpleFunctionSymbol private set - @Suppress("RedundantModalityModifier") // Explicit `final` keyword can be dropped after bootstrap update - final override var throwIseSymbol: IrSimpleFunctionSymbol private set - @Suppress("RedundantModalityModifier") // Explicit `final` keyword can be dropped after bootstrap update - final override var andandSymbol: IrSimpleFunctionSymbol private set - @Suppress("RedundantModalityModifier") // Explicit `final` keyword can be dropped after bootstrap update - final override var ororSymbol: IrSimpleFunctionSymbol private set - @Suppress("RedundantModalityModifier") // Explicit `final` keyword can be dropped after bootstrap update - final override var noWhenBranchMatchedExceptionSymbol: IrSimpleFunctionSymbol private set - @Suppress("RedundantModalityModifier") // Explicit `final` keyword can be dropped after bootstrap update - final override var illegalArgumentExceptionSymbol: IrSimpleFunctionSymbol private set - @Suppress("RedundantModalityModifier") // Explicit `final` keyword can be dropped after bootstrap update - final override var dataClassArrayMemberHashCodeSymbol: IrSimpleFunctionSymbol private set - @Suppress("RedundantModalityModifier") // Explicit `final` keyword can be dropped after bootstrap update - final override var dataClassArrayMemberToStringSymbol: IrSimpleFunctionSymbol private set + override var eqeqeqSymbol: IrSimpleFunctionSymbol private set + override var eqeqSymbol: IrSimpleFunctionSymbol private set + override var throwCceSymbol: IrSimpleFunctionSymbol private set + override var throwIseSymbol: IrSimpleFunctionSymbol private set + override var andandSymbol: IrSimpleFunctionSymbol private set + override var ororSymbol: IrSimpleFunctionSymbol private set + override var noWhenBranchMatchedExceptionSymbol: IrSimpleFunctionSymbol private set + override var illegalArgumentExceptionSymbol: IrSimpleFunctionSymbol private set + override var dataClassArrayMemberHashCodeSymbol: IrSimpleFunctionSymbol private set + override var dataClassArrayMemberToStringSymbol: IrSimpleFunctionSymbol private set - @Suppress("RedundantModalityModifier") // Explicit `final` keyword can be dropped after bootstrap update - final override var checkNotNullSymbol: IrSimpleFunctionSymbol private set + override var checkNotNullSymbol: IrSimpleFunctionSymbol private set override val arrayOfNulls: IrSimpleFunctionSymbol by lazy { findFunctions(kotlinPackage, Name.identifier("arrayOfNulls")).first { it.owner.dispatchReceiverParameter == null && it.owner.valueParameters.size == 1 && @@ -408,14 +397,10 @@ class IrBuiltInsOverFir( override val linkageErrorSymbol: IrSimpleFunctionSymbol get() = TODO("Not yet implemented") - @Suppress("RedundantModalityModifier") // Explicit `final` keyword can be dropped after bootstrap update - final override var lessFunByOperandType: Map private set - @Suppress("RedundantModalityModifier") // Explicit `final` keyword can be dropped after bootstrap update - final override var lessOrEqualFunByOperandType: Map private set - @Suppress("RedundantModalityModifier") // Explicit `final` keyword can be dropped after bootstrap update - final override var greaterOrEqualFunByOperandType: Map private set - @Suppress("RedundantModalityModifier") // Explicit `final` keyword can be dropped after bootstrap update - final override var greaterFunByOperandType: Map private set + override var lessFunByOperandType: Map private set + override var lessOrEqualFunByOperandType: Map private set + override var greaterOrEqualFunByOperandType: Map private set + override var greaterFunByOperandType: Map private set init { with(this.operatorsPackageFragment) {