From 0bc79fe69d9a3bb604cf8cd1e6aefb20f4c3f363 Mon Sep 17 00:00:00 2001 From: "marat.akhin" Date: Thu, 16 Nov 2023 20:37:30 +0100 Subject: [PATCH] [K2] Make CONFLICTING_OVERLOADS + HIDDEN ignore work only for finals When fixing KT-22004, the analysis was incomplete, the details are available at KT-63540. This change restricts the ignore of conflicting overloads on hidden callables only for final ones. ^KT-63540 Fixed --- ...CompilerTestFE10TestdataTestGenerated.java | 6 + ...sticCompilerFE10TestDataTestGenerated.java | 6 + ...eeOldFrontendDiagnosticsTestGenerated.java | 6 + ...siOldFrontendDiagnosticsTestGenerated.java | 6 + .../analysis/checkers/FirConflictsHelpers.kt | 27 +- .../checkers/declaration/declarationUtils.kt | 24 +- .../OpenFunctionsInMemberScope.kt | 419 ++++++++++++++++++ .../TypeParameterMultipleBounds.fir.kt | 17 - .../TypeParameterMultipleBounds.kt | 2 + .../test/runners/DiagnosticTestGenerated.java | 6 + 10 files changed, 487 insertions(+), 32 deletions(-) create mode 100644 compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/OpenFunctionsInMemberScope.kt delete mode 100644 compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/TypeParameterMultipleBounds.fir.kt diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosticCompilerTestFE10TestdataTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosticCompilerTestFE10TestdataTestGenerated.java index 0386ccfe676..fe7a1bd9d3a 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosticCompilerTestFE10TestdataTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosticCompilerTestFE10TestdataTestGenerated.java @@ -27297,6 +27297,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia runTest("compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/NoHiddenTransitivityFromClassifierToConstructor.kt"); } + @Test + @TestMetadata("OpenFunctionsInMemberScope.kt") + public void testOpenFunctionsInMemberScope() throws Exception { + runTest("compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/OpenFunctionsInMemberScope.kt"); + } + @Test @TestMetadata("TypeParameterMultipleBounds.kt") public void testTypeParameterMultipleBounds() throws Exception { diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated.java index d47371d1d6c..537c7d00f8b 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated.java @@ -27297,6 +27297,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated runTest("compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/NoHiddenTransitivityFromClassifierToConstructor.kt"); } + @Test + @TestMetadata("OpenFunctionsInMemberScope.kt") + public void testOpenFunctionsInMemberScope() throws Exception { + runTest("compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/OpenFunctionsInMemberScope.kt"); + } + @Test @TestMetadata("TypeParameterMultipleBounds.kt") public void testTypeParameterMultipleBounds() throws Exception { diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirLightTreeOldFrontendDiagnosticsTestGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirLightTreeOldFrontendDiagnosticsTestGenerated.java index 31a5b54212a..48bd0428b4f 100644 --- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirLightTreeOldFrontendDiagnosticsTestGenerated.java +++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirLightTreeOldFrontendDiagnosticsTestGenerated.java @@ -25231,6 +25231,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir runTest("compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/NoHiddenTransitivityFromClassifierToConstructor.kt"); } + @Test + @TestMetadata("OpenFunctionsInMemberScope.kt") + public void testOpenFunctionsInMemberScope() throws Exception { + runTest("compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/OpenFunctionsInMemberScope.kt"); + } + @Test @TestMetadata("TypeParameterMultipleBounds.kt") public void testTypeParameterMultipleBounds() throws Exception { diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirPsiOldFrontendDiagnosticsTestGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirPsiOldFrontendDiagnosticsTestGenerated.java index 88bb14b69b2..a4bd86e5c9b 100644 --- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirPsiOldFrontendDiagnosticsTestGenerated.java +++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirPsiOldFrontendDiagnosticsTestGenerated.java @@ -25237,6 +25237,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia runTest("compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/NoHiddenTransitivityFromClassifierToConstructor.kt"); } + @Test + @TestMetadata("OpenFunctionsInMemberScope.kt") + public void testOpenFunctionsInMemberScope() throws Exception { + runTest("compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/OpenFunctionsInMemberScope.kt"); + } + @Test @TestMetadata("TypeParameterMultipleBounds.kt") public void testTypeParameterMultipleBounds() throws Exception { diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/FirConflictsHelpers.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/FirConflictsHelpers.kt index 7bafdf21767..2f82d76efdf 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/FirConflictsHelpers.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/FirConflictsHelpers.kt @@ -13,6 +13,7 @@ import org.jetbrains.kotlin.diagnostics.reportOn import org.jetbrains.kotlin.fir.* import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.checkers.declaration.FirNameConflictsTracker +import org.jetbrains.kotlin.fir.analysis.checkers.declaration.isEffectivelyFinal import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors import org.jetbrains.kotlin.fir.declarations.* import org.jetbrains.kotlin.fir.declarations.impl.FirResolvedDeclarationStatusImpl.Companion.DEFAULT_STATUS_FOR_STATUSLESS_DECLARATIONS @@ -289,7 +290,7 @@ private fun , S : D> FirDeclarationCollector.collect( val conflicts = SmartSet.create>() for (otherDeclaration in it) { - if (otherDeclaration != declaration && !areNonConflictingCallables(declaration, otherDeclaration, session)) { + if (otherDeclaration != declaration && !areNonConflictingCallables(declaration, otherDeclaration)) { conflicts.add(otherDeclaration) declarationConflictingSymbols.getOrPut(otherDeclaration) { SmartSet.create() }.add(declaration) } @@ -460,7 +461,7 @@ private fun FirDeclarationCollector>.collectTopLevelConflict( conflicting is FirMemberDeclaration && !session.visibilityChecker.isVisible(conflicting, session, containingFile, emptyList(), dispatchReceiver = null) ) return - if (areNonConflictingCallables(declaration, conflictingSymbol, session)) return + if (areNonConflictingCallables(declaration, conflictingSymbol)) return declarationConflictingSymbols.getOrPut(declaration) { SmartSet.create() }.add(conflictingSymbol) } @@ -487,10 +488,9 @@ private fun areCompatibleMainFunctions( && declaration1.representsMainFunctionAllowingConflictingOverloads(session) && declaration2.representsMainFunctionAllowingConflictingOverloads(session) -private fun areNonConflictingCallables( +private fun FirDeclarationCollector<*>.areNonConflictingCallables( declaration: FirBasedSymbol<*>, conflicting: FirBasedSymbol<*>, - session: FirSession, ): Boolean { if (isExpectAndActual(declaration, conflicting)) return true @@ -498,15 +498,20 @@ private fun areNonConflictingCallables( val conflictingIsLowPriority = hasLowPriorityAnnotation(conflicting.annotations) if (declarationIsLowPriority != conflictingIsLowPriority) return true - val declarationIsHidden = declaration.isDeprecationLevelHidden(session.languageVersionSettings) - if (declarationIsHidden) return true + if (declaration !is FirCallableSymbol<*> || conflicting !is FirCallableSymbol<*>) return false - val conflictingIsHidden = conflicting.isDeprecationLevelHidden(session.languageVersionSettings) - if (conflictingIsHidden) return true + val declarationIsFinal = declaration.isEffectivelyFinal(session) + val conflictingIsFinal = conflicting.isEffectivelyFinal(session) - return declaration is FirCallableSymbol<*> && - conflicting is FirCallableSymbol<*> && - session.declarationOverloadabilityHelper.isOverloadable(declaration, conflicting) + if (declarationIsFinal && conflictingIsFinal) { + val declarationIsHidden = declaration.isDeprecationLevelHidden(session.languageVersionSettings) + if (declarationIsHidden) return true + + val conflictingIsHidden = conflicting.isDeprecationLevelHidden(session.languageVersionSettings) + if (conflictingIsHidden) return true + } + + return session.declarationOverloadabilityHelper.isOverloadable(declaration, conflicting) } /** Checks for redeclarations of value and type parameters, and local variables. */ diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/declarationUtils.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/declarationUtils.kt index b99f16a4b42..a6c07934a7d 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/declarationUtils.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/declarationUtils.kt @@ -9,6 +9,7 @@ import org.jetbrains.kotlin.descriptors.ClassKind import org.jetbrains.kotlin.descriptors.Modality import org.jetbrains.kotlin.fir.FirSession import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext +import org.jetbrains.kotlin.fir.analysis.checkers.getContainingClassSymbol import org.jetbrains.kotlin.fir.analysis.checkers.modality import org.jetbrains.kotlin.fir.declarations.* import org.jetbrains.kotlin.fir.declarations.utils.* @@ -36,16 +37,31 @@ private inline fun isInsideSpecificClass( context.containingDeclarations.asReversed().any { it is FirRegularClass && predicate.invoke(it) } } -internal fun FirMemberDeclaration.isEffectivelyFinal(context: CheckerContext): Boolean { - if (this.isFinal) return true - val containingClass = context.containingDeclarations.lastOrNull() as? FirRegularClass ?: return true +internal fun FirMemberDeclaration.isEffectivelyFinal(context: CheckerContext): Boolean = + this.symbol.isEffectivelyFinal(context.session) + +internal fun FirBasedSymbol<*>.isEffectivelyFinal(session: FirSession): Boolean { + if (this.isFinal()) return true + + val containingClass = this.getContainingClassSymbol(session) as? FirClassSymbol<*> ?: return true + if (containingClass.isEnumClass) { - // Enum class has enum entries and hence is not considered final. + // Enum class has enum entries and hence is not considered final return false } return containingClass.isFinal } +private fun FirBasedSymbol<*>.isFinal(): Boolean { + when (this) { + is FirCallableSymbol<*> -> if (this.isFinal) return true + is FirClassLikeSymbol<*> -> if (this.isFinal) return true + else -> return true + } + + return false +} + internal fun FirMemberDeclaration.isEffectivelyExpect( containingClass: FirClass?, context: CheckerContext, diff --git a/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/OpenFunctionsInMemberScope.kt b/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/OpenFunctionsInMemberScope.kt new file mode 100644 index 00000000000..f67f66f7c0f --- /dev/null +++ b/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/OpenFunctionsInMemberScope.kt @@ -0,0 +1,419 @@ +// DIAGNOSTICS: -MISPLACED_TYPE_PARAMETER_CONSTRAINTS +// FIR_IDENTICAL + +open class MemberScope { + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testBasic() {} + open fun testBasic() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testIdenticalReturnTypes(): UserKlass = UserKlass() + open fun testIdenticalReturnTypes(): UserKlass = UserKlass() + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testDifferencesInReturnTypePresence(): Unit {} + open fun testDifferencesInReturnTypePresence() {} + + open fun testDifferencesInReturnTypePresenceReverse(): Unit {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testDifferencesInReturnTypePresenceReverse() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testDifferentReturnTypes(): UserKlassA = UserKlassA() + open fun testDifferentReturnTypes(): UserKlassB = UserKlassB() + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testVarianceDifferentReturnTypesA(): Invariant = Invariant() + open fun testVarianceDifferentReturnTypesA(): Invariant = Invariant() + + open fun testVarianceDifferentReturnTypesAReverse(): Invariant = Invariant() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testVarianceDifferentReturnTypesAReverse(): Invariant = Invariant() + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testVarianceDifferentReturnTypesB(): Invariant = Invariant() + open fun testVarianceDifferentReturnTypesB(): Invariant = Invariant() + + open fun testVarianceDifferentReturnTypesBReverse(): Invariant = Invariant() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testVarianceDifferentReturnTypesBReverse(): Invariant = Invariant() + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testVarianceDifferentReturnTypesC(): Invariant = Invariant() + open fun testVarianceDifferentReturnTypesC(): Invariant<*> = Invariant() + + open fun testVarianceDifferentReturnTypesCReverse(): Invariant = Invariant() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testVarianceDifferentReturnTypesCReverse(): Invariant<*> = Invariant() + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testVarianceDifferentReturnTypesD(): Invariant = Invariant() + open fun testVarianceDifferentReturnTypesD(): Invariant<*> = Invariant() + + open fun testVarianceDifferentReturnTypesDReverse(): Invariant = Invariant() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testVarianceDifferentReturnTypesDReverse(): Invariant<*> = Invariant() + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testVarianceDifferentReturnTypesE(): Invariant = Invariant() + open fun testVarianceDifferentReturnTypesE(): Invariant<*> = Invariant() + + open fun testVarianceDifferentReturnTypesEReverse(): Invariant = Invariant() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testVarianceDifferentReturnTypesEReverse(): Invariant<*> = Invariant() + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testVarianceDifferentReturnTypesF(): Invariant = Invariant() + open fun testVarianceDifferentReturnTypesF(): Invariant = Invariant() + + open fun testVarianceDifferentReturnTypesFReverse(): Invariant = Invariant() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testVarianceDifferentReturnTypesFReverse(): Invariant = Invariant() + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeAliasedReturnTypes(): UserKlass = UserKlass() + open fun testTypeAliasedReturnTypes(): SameUserKlass = UserKlass() + + open fun testTypeAliasedReturnTypesReverse(): UserKlass = UserKlass() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeAliasedReturnTypesReverse(): SameUserKlass = UserKlass() + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun UserKlass.testIdenticalExtensionReceivers() {} + open fun UserKlass.testIdenticalExtensionReceivers() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun UserKlass.testTypeAliasedExtensionReceivers() {} + open fun SameUserKlass.testTypeAliasedExtensionReceivers() {} + + open fun UserKlass.testTypeAliasedExtensionReceiversReverse() {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun SameUserKlass.testTypeAliasedExtensionReceiversReverse() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testIdenticalValueParameters(arg: UserKlass) {} + open fun testIdenticalValueParameters(arg: UserKlass) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testDifferentlyNamedValueParameters(argA: UserKlass) {} + open fun testDifferentlyNamedValueParameters(argB: UserKlass) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeAliasedValueParameterTypes(arg: UserKlass) {} + open fun testTypeAliasedValueParameterTypes(arg: SameUserKlass) {} + + open fun testTypeAliasedValueParameterTypesReverse(arg: UserKlass) {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeAliasedValueParameterTypesReverse(arg: SameUserKlass) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testMultipleIdenticalValueParameters(arg1: UserKlassA, arg2: UserKlassB) {} + open fun testMultipleIdenticalValueParameters(arg1: UserKlassA, arg2: UserKlassB) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testMultipleDifferentlyNamedValueParametersA(arg1: UserKlassA, arg2A: UserKlassB) {} + open fun testMultipleDifferentlyNamedValueParametersA(arg1: UserKlassA, arg2B: UserKlassB) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testMultipleDifferentlyNamedValueParametersB(arg1A: UserKlassA, arg2A: UserKlassB) {} + open fun testMultipleDifferentlyNamedValueParametersB(arg1B: UserKlassA, arg2B: UserKlassB) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testMultipleTypeAliasedValueParameterTypesA(arg1: UserKlassA, arg2: UserKlassB) {} + open fun testMultipleTypeAliasedValueParameterTypesA(arg1: UserKlassA, arg2: SameUserKlassB) {} + + open fun testMultipleTypeAliasedValueParameterTypesAReverse(arg1: UserKlassA, arg2: UserKlassB) {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testMultipleTypeAliasedValueParameterTypesAReverse(arg1: UserKlassA, arg2: SameUserKlassB) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testMultipleTypeAliasedValueParameterTypesB(arg1: UserKlassA, arg2: UserKlassB) {} + open fun testMultipleTypeAliasedValueParameterTypesB(arg1: SameUserKlassA, arg2: SameUserKlassB) {} + + open fun testMultipleTypeAliasedValueParameterTypesBReverse(arg1: UserKlassA, arg2: UserKlassB) {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testMultipleTypeAliasedValueParameterTypesBReverse(arg1: SameUserKlassA, arg2: SameUserKlassB) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testValueParameterWithIdenticalDefaultArguments(arg: UserKlass = defaultArgument) {} + open fun testValueParameterWithIdenticalDefaultArguments(arg: UserKlass = defaultArgument) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testDifferencesInValueParameterDefaultArgumentsPresence(arg: UserKlass = defaultArgument) {} + open fun testDifferencesInValueParameterDefaultArgumentsPresence(arg: UserKlass) {} + + open fun testDifferencesInValueParameterDefaultArgumentsPresenceReverse(arg: UserKlass = defaultArgument) {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testDifferencesInValueParameterDefaultArgumentsPresenceReverse(arg: UserKlass) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testValueParameterWithDifferentDefaultArguments(arg: UserKlass = defaultArgumentA) {} + open fun testValueParameterWithDifferentDefaultArguments(arg: UserKlass = defaultArgumentB) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testValueParameterWithAliasedDefaultArguments(arg: UserKlass = defaultArgument) {} + open fun testValueParameterWithAliasedDefaultArguments(arg: UserKlass = sameDefaultArgument) {} + + open fun testValueParameterWithAliasedDefaultArgumentsReverse(arg: UserKlass = defaultArgument) {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testValueParameterWithAliasedDefaultArgumentsReverse(arg: UserKlass = sameDefaultArgument) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testIdenticalTypeParametersA() {} + open fun testIdenticalTypeParametersA() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testIdenticalTypeParametersB(arg: T) {} + open fun testIdenticalTypeParametersB(arg: T) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testIdenticalTypeParametersC(arg: Invariant) {} + open fun testIdenticalTypeParametersC(arg: Invariant) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testDifferentlyNamedTypeParametersA() {} + open fun testDifferentlyNamedTypeParametersA() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testDifferentlyNamedTypeParametersB(arg: TA) {} + open fun testDifferentlyNamedTypeParametersB(arg: TB) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testDifferentlyNamedTypeParametersC(arg: Invariant) {} + open fun testDifferentlyNamedTypeParametersC(arg: Invariant) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testMultipleIdenticalTypeParameters() {} + open fun testMultipleIdenticalTypeParameters() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testMultipleDifferentlyNamedTypeParametersA() {} + open fun testMultipleDifferentlyNamedTypeParametersA() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testMultipleDifferentlyNamedTypeParametersB() {} + open fun testMultipleDifferentlyNamedTypeParametersB() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithIdenticalUpperBoundsA() {} + open fun testTypeParameterWithIdenticalUpperBoundsA() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithIdenticalUpperBoundsB(arg: T) {} + open fun testTypeParameterWithIdenticalUpperBoundsB(arg: T) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithIdenticalUpperBoundsC(arg: Invariant) {} + open fun testTypeParameterWithIdenticalUpperBoundsC(arg: Invariant) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testDifferencesInTypeParameterUpperBoundsPresence() {} + open fun testDifferencesInTypeParameterUpperBoundsPresence() {} + + open fun testDifferencesInTypeParameterUpperBoundsPresenceReverse() {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testDifferencesInTypeParameterUpperBoundsPresenceReverse() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithDifferentUpperBounds() {} + open fun testTypeParameterWithDifferentUpperBounds() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun > testTypeParameterWithVarianceDifferentUpperBoundsA() {} + open fun > testTypeParameterWithVarianceDifferentUpperBoundsA() {} + + open fun > testTypeParameterWithVarianceDifferentUpperBoundsAReverse() {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun > testTypeParameterWithVarianceDifferentUpperBoundsAReverse() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun > testTypeParameterWithVarianceDifferentUpperBoundsB() {} + open fun > testTypeParameterWithVarianceDifferentUpperBoundsB() {} + + open fun > testTypeParameterWithVarianceDifferentUpperBoundsBReverse() {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun > testTypeParameterWithVarianceDifferentUpperBoundsBReverse() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun > testTypeParameterWithVarianceDifferentUpperBoundsC() {} + open fun > testTypeParameterWithVarianceDifferentUpperBoundsC() {} + + open fun > testTypeParameterWithVarianceDifferentUpperBoundsCReverse() {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun > testTypeParameterWithVarianceDifferentUpperBoundsCReverse() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun > testTypeParameterWithVarianceDifferentUpperBoundsD() {} + open fun > testTypeParameterWithVarianceDifferentUpperBoundsD() {} + + open fun > testTypeParameterWithVarianceDifferentUpperBoundsDReverse() {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun > testTypeParameterWithVarianceDifferentUpperBoundsDReverse() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun > testTypeParameterWithVarianceDifferentUpperBoundsE() {} + open fun > testTypeParameterWithVarianceDifferentUpperBoundsE() {} + + open fun > testTypeParameterWithVarianceDifferentUpperBoundsEReverse() {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun > testTypeParameterWithVarianceDifferentUpperBoundsEReverse() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun > testTypeParameterWithVarianceDifferentUpperBoundsF() {} + open fun > testTypeParameterWithVarianceDifferentUpperBoundsF() {} + + open fun > testTypeParameterWithVarianceDifferentUpperBoundsFReverse() {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun > testTypeParameterWithVarianceDifferentUpperBoundsFReverse() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithTypeAliasedUpperBoundsA() {} + open fun testTypeParameterWithTypeAliasedUpperBoundsA() {} + + open fun testTypeParameterWithTypeAliasedUpperBoundsAReverse() {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithTypeAliasedUpperBoundsAReverse() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithTypeAliasedUpperBoundsB(arg: T) {} + open fun testTypeParameterWithTypeAliasedUpperBoundsB(arg: T) {} + + open fun testTypeParameterWithTypeAliasedUpperBoundsBReverse(arg: T) {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithTypeAliasedUpperBoundsBReverse(arg: T) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithTypeAliasedUpperBoundsC(arg: Invariant) {} + open fun testTypeParameterWithTypeAliasedUpperBoundsC(arg: Invariant) {} + + open fun testTypeParameterWithTypeAliasedUpperBoundsCReverse(arg: Invariant) {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithTypeAliasedUpperBoundsCReverse(arg: Invariant) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithMultipleIdenticalUpperBoundsAA() where T: UserInterfaceA, T: UserInterfaceB {} + open fun testTypeParameterWithMultipleIdenticalUpperBoundsAA() where T: UserInterfaceA, T: UserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithMultipleIdenticalUpperBoundsAB(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} + open fun testTypeParameterWithMultipleIdenticalUpperBoundsAB(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithMultipleIdenticalUpperBoundsAC(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} + open fun testTypeParameterWithMultipleIdenticalUpperBoundsAC(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithMultipleIdenticalUpperBoundsBA() where T: UserInterfaceB {} + open fun testTypeParameterWithMultipleIdenticalUpperBoundsBA() where T: UserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithMultipleIdenticalUpperBoundsBB(arg: T) where T: UserInterfaceB {} + open fun testTypeParameterWithMultipleIdenticalUpperBoundsBB(arg: T) where T: UserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithMultipleIdenticalUpperBoundsBC(arg: Invariant) where T: UserInterfaceB {} + open fun testTypeParameterWithMultipleIdenticalUpperBoundsBC(arg: Invariant) where T: UserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testDifferencesInTypeParameterMultipleUpperBoundsPresenceA() where T: UserInterfaceA, T: UserInterfaceB {} + open fun testDifferencesInTypeParameterMultipleUpperBoundsPresenceA() where T: UserInterfaceA {} + + open fun testDifferencesInTypeParameterMultipleUpperBoundsPresenceB() where T: UserInterfaceB {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testDifferencesInTypeParameterMultipleUpperBoundsPresenceB() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithMultipleDifferentUpperBoundsAA() where T: UserInterfaceA, T: UserInterfaceB {} + open fun testTypeParameterWithMultipleDifferentUpperBoundsAA() where T: UserInterfaceA, T: UserInterfaceC {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithMultipleDifferentUpperBoundsAB() where T: UserInterfaceB {} + open fun testTypeParameterWithMultipleDifferentUpperBoundsAB() where T: UserInterfaceC {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithMultipleDifferentUpperBoundsAC() where T: UserInterfaceA {} + open fun testTypeParameterWithMultipleDifferentUpperBoundsAC() where T: UserInterfaceA {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithMultipleDifferentUpperBoundsBA() where T: UserInterfaceA, T: UserInterfaceB {} + open fun testTypeParameterWithMultipleDifferentUpperBoundsBA() where T: UserInterfaceC, T: UserInterfaceD {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithMultipleDifferentUpperBoundsBB() where T: UserInterfaceB {} + open fun testTypeParameterWithMultipleDifferentUpperBoundsBB() where T: UserInterfaceD {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAA() where T: UserInterfaceA, T: UserInterfaceB {} + open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAA() where T: UserInterfaceA, T: SameUserInterfaceB {} + + open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAAReverse() where T: UserInterfaceA, T: UserInterfaceB {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAAReverse() where T: UserInterfaceA, T: SameUserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAB(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} + open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAB(arg: T) where T: UserInterfaceA, T: SameUserInterfaceB {} + + open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAABReverse(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAABReverse(arg: T) where T: UserInterfaceA, T: SameUserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAC(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} + open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAC(arg: Invariant) where T: UserInterfaceA, T: SameUserInterfaceB {} + + open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAACReverse(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAACReverse(arg: Invariant) where T: UserInterfaceA, T: SameUserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABA() where T: UserInterfaceB {} + open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABA() where T: SameUserInterfaceB {} + + open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABAReverse() where T: UserInterfaceB {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABAReverse() where T: SameUserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABB(arg: T) where T: UserInterfaceB {} + open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABB(arg: T) where T: SameUserInterfaceB {} + + open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABBReverse(arg: T) where T: UserInterfaceB {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABBReverse(arg: T) where T: SameUserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABC(arg: Invariant) where T: UserInterfaceB {} + open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABC(arg: Invariant) where T: SameUserInterfaceB {} + + open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABCReverse(arg: Invariant) where T: UserInterfaceB {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABCReverse(arg: Invariant) where T: SameUserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACA() where T: UserInterfaceA {} + open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACA() where T: UserInterfaceA {} + + open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACAReverse() where T: UserInterfaceA {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACAReverse() where T: UserInterfaceA {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACB(arg: T) where T: UserInterfaceA {} + open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACB(arg: T) where T: UserInterfaceA {} + + open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACBReverse(arg: T) where T: UserInterfaceA {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACBReverse(arg: T) where T: UserInterfaceA {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACC(arg: Invariant) where T: UserInterfaceA {} + open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACC(arg: Invariant) where T: UserInterfaceA {} + + open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACCReverse(arg: Invariant) where T: UserInterfaceA {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACCReverse(arg: Invariant) where T: UserInterfaceA {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAA() where T: UserInterfaceA, T: UserInterfaceB {} + open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAA() where T: SameUserInterfaceA, T: SameUserInterfaceB {} + + open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAAReverse() where T: UserInterfaceA, T: UserInterfaceB {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAAReverse() where T: SameUserInterfaceA, T: SameUserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAB(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} + open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAB(arg: T) where T: SameUserInterfaceA, T: SameUserInterfaceB {} + + open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBABReverse(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBABReverse(arg: T) where T: SameUserInterfaceA, T: SameUserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAC(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} + open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAC(arg: Invariant) where T: SameUserInterfaceA, T: SameUserInterfaceB {} + + open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBACReverse(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBACReverse(arg: Invariant) where T: SameUserInterfaceA, T: SameUserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBA() where T: UserInterfaceB {} + open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBA() where T: SameUserInterfaceB {} + + open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBAReverse() where T: UserInterfaceB {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBAReverse() where T: SameUserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBB(arg: T) where T: UserInterfaceB {} + open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBB(arg: T) where T: SameUserInterfaceB {} + + open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBBReverse(arg: T) where T: UserInterfaceB {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBBReverse(arg: T) where T: SameUserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBC(arg: Invariant) where T: UserInterfaceB {} + open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBC(arg: Invariant) where T: SameUserInterfaceB {} + + open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBCReverse(arg: Invariant) where T: UserInterfaceB {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBCReverse(arg: Invariant) where T: SameUserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithMultipleShuffledUpperBoundsAA() where T: UserInterfaceA, T: UserInterfaceB {} + open fun testTypeParameterWithMultipleShuffledUpperBoundsAA() where T: UserInterfaceB, T: UserInterfaceA {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithMultipleShuffledUpperBoundsAB(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} + open fun testTypeParameterWithMultipleShuffledUpperBoundsAB(arg: T) where T: UserInterfaceB, T: UserInterfaceA {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithMultipleShuffledUpperBoundsAC(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} + open fun testTypeParameterWithMultipleShuffledUpperBoundsAC(arg: Invariant) where T: UserInterfaceB, T: UserInterfaceA {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithMultipleShuffledUpperBoundsBA() where T: UserInterfaceB {} + open fun testTypeParameterWithMultipleShuffledUpperBoundsBA() where T: UserInterfaceA {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithMultipleShuffledUpperBoundsBB(arg: T) where T: UserInterfaceB {} + open fun testTypeParameterWithMultipleShuffledUpperBoundsBB(arg: T) where T: UserInterfaceA {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun testTypeParameterWithMultipleShuffledUpperBoundsBC(arg: Invariant) where T: UserInterfaceB {} + open fun testTypeParameterWithMultipleShuffledUpperBoundsBC(arg: Invariant) where T: UserInterfaceA {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) infix open fun UserKlass.testIdenticalPresenceOfInfixModifier(arg: UserKlass) {} + infix open fun UserKlass.testIdenticalPresenceOfInfixModifier(arg: UserKlass) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) infix open fun UserKlass.testDifferencesInInfixModifierPresence(arg: UserKlass) {} + open fun UserKlass.testDifferencesInInfixModifierPresence(arg: UserKlass) {} + + infix open fun UserKlass.testDifferencesInInfixModifierPresenceReverse(arg: UserKlass) {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun UserKlass.testDifferencesInInfixModifierPresenceReverse(arg: UserKlass) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) operator open fun UserKlassA.unaryPlus() {} + operator open fun UserKlassA.unaryPlus() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) operator open fun UserKlassB.unaryPlus() {} + open fun UserKlassB.unaryPlus() {} + + operator open fun UserKlassB.unaryMinus() {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) open fun UserKlassB.unaryMinus() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal open fun testIdenticalInternalVisibility() {} + internal open fun testIdenticalInternalVisibility() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal open fun testDifferencesInInternalAndPublicVisibilities() {} + public open fun testDifferencesInInternalAndPublicVisibilities() {} + + internal open fun testDifferencesInInternalAndPublicVisibilitiesReverse() {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) public open fun testDifferencesInInternalAndPublicVisibilitiesReverse() {} + +} + +open class Invariant + +class UserKlass +class UserKlassA +class UserKlassB +typealias SameUserKlass = UserKlass +typealias SameUserKlassA = UserKlassA +typealias SameUserKlassB = UserKlassB + +val defaultArgument = UserKlass() +val defaultArgumentA = UserKlass() +val defaultArgumentB = UserKlass() +val sameDefaultArgument = defaultArgument + +interface UserInterface +interface UserInterfaceA +interface UserInterfaceB +interface UserInterfaceC +interface UserInterfaceD +typealias SameUserInterface = UserInterface +typealias SameUserInterfaceA = UserInterfaceA +typealias SameUserInterfaceB = UserInterfaceB diff --git a/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/TypeParameterMultipleBounds.fir.kt b/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/TypeParameterMultipleBounds.fir.kt deleted file mode 100644 index db41f8d75c3..00000000000 --- a/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/TypeParameterMultipleBounds.fir.kt +++ /dev/null @@ -1,17 +0,0 @@ -import java.io.Serializable - -interface Test1 { - fun foo(t: T) where T : Cloneable, T : Serializable - @Deprecated("foo", level = DeprecationLevel.HIDDEN) - fun foo(t: T) where T : Serializable, T : Cloneable -} - - -interface I1 -interface I2 : I1 - -interface Test2 { - fun foo(t: T) where T : I1, T : I2 - @Deprecated("foo", level = DeprecationLevel.HIDDEN) - fun foo(t: T) where T : I2, T : I1 -} diff --git a/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/TypeParameterMultipleBounds.kt b/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/TypeParameterMultipleBounds.kt index a85a6a2444f..0671bc75b16 100644 --- a/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/TypeParameterMultipleBounds.kt +++ b/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/TypeParameterMultipleBounds.kt @@ -1,3 +1,5 @@ +// FIR_IDENTICAL + import java.io.Serializable interface Test1 { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java index 8672fb31933..ff4b7d15fe2 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java @@ -27297,6 +27297,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/NoHiddenTransitivityFromClassifierToConstructor.kt"); } + @Test + @TestMetadata("OpenFunctionsInMemberScope.kt") + public void testOpenFunctionsInMemberScope() throws Exception { + runTest("compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/OpenFunctionsInMemberScope.kt"); + } + @Test @TestMetadata("TypeParameterMultipleBounds.kt") public void testTypeParameterMultipleBounds() throws Exception {