[FIR, IR] Cleanup: drop redundant enumConstructorsAreAlwaysCompatible

It's constantly true in FIR and IR (it was false in K1)

Also see: 8b9079d026

Review: https://jetbrains.team/p/kt/reviews/12750/timeline
This commit is contained in:
Nikita Bobko
2023-10-26 00:52:24 +02:00
committed by teamcity
parent 75a0442b61
commit b331726c6e
5 changed files with 0 additions and 11 deletions
@@ -46,9 +46,6 @@ class FirExpectActualMatchingContextImpl private constructor(
override val shouldCheckAbsenceOfDefaultParamsInActual: Boolean
get() = true
override val enumConstructorsAreAlwaysCompatible: Boolean
get() = true
override val allowClassActualizationWithWiderVisibility: Boolean
get() = true
@@ -95,9 +95,6 @@ internal abstract class IrExpectActualMatchingContext(
override val innerClassesCapturesOuterTypeParameters: Boolean
get() = false
override val enumConstructorsAreAlwaysCompatible: Boolean
get() = true
override val RegularClassSymbolMarker.classId: ClassId
get() = asIr().classIdOrFail
@@ -328,7 +328,6 @@ object AbstractExpectActualChecker {
}
if (
enumConstructorsAreAlwaysCompatible &&
expectContainingClass?.classKind == ClassKind.ENUM_CLASS &&
actualContainingClass?.classKind == ClassKind.ENUM_CLASS &&
expectDeclaration is ConstructorSymbolMarker &&
@@ -180,7 +180,6 @@ object AbstractExpectActualMatcher {
}
if (
enumConstructorsAreAlwaysCompatible &&
expectContainingClass?.classKind == ClassKind.ENUM_CLASS &&
actualContainingClass?.classKind == ClassKind.ENUM_CLASS &&
expectDeclaration is ConstructorSymbolMarker &&
@@ -35,9 +35,6 @@ interface ExpectActualMatchingContext<T : DeclarationSymbolMarker> : TypeSystemC
val innerClassesCapturesOuterTypeParameters: Boolean
get() = true
val enumConstructorsAreAlwaysCompatible: Boolean
get() = false
// Try to drop it once KT-61105 is fixed
val shouldCheckAbsenceOfDefaultParamsInActual: Boolean