diff --git a/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/ConstructorsInMemberScope.fir.kt b/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/ConstructorsInMemberScope.fir.kt new file mode 100644 index 00000000000..6af6a25ce53 --- /dev/null +++ b/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/ConstructorsInMemberScope.fir.kt @@ -0,0 +1,289 @@ +// DIAGNOSTICS: -CONFLICTING_JVM_DECLARATIONS, -MISPLACED_TYPE_PARAMETER_CONSTRAINTS + +class MemberScope { + + + class TestBasic { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + constructor() + } + + + class TestIdenticalPrimaryAndSecondaryConstructorsA constructor() { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() : this() + } + + class TestIdenticalPrimaryAndSecondaryConstructorsB() { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() : this() + } + + + class TestIdenticalDelegatedPrimaryConstructorCalls constructor(placeholder: UserKlass) { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() : this(UserKlass()) + constructor() : this(UserKlass()) + } + + + open class SuperConstructorSource constructor(placeholder: UserKlass) + class TestIdenticalDelegatedSuperConstructorCalls: SuperConstructorSource { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() : super(UserKlass()) + constructor() : super(UserKlass()) + } + + + class TestIdenticalValueParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass) + constructor(arg: UserKlass) + } + + class TestDifferentlyNamedValueParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(argA: UserKlass) + constructor(argB: UserKlass) + } + + class TestTypeAliasedValueParameterTypes { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass) + constructor(arg: SameUserKlass) + } + + class TestTypeAliasedValueParameterTypesReverse { + constructor(arg: UserKlass) + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: SameUserKlass) + } + + + class TestMultipleIdenticalValueParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2: UserKlassB) + constructor(arg1: UserKlassA, arg2: UserKlassB) + } + + class TestMultipleDifferentlyNamedValueParametersA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2A: UserKlassB) + constructor(arg1: UserKlassA, arg2B: UserKlassB) + } + + class TestMultipleDifferentlyNamedValueParametersB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1A: UserKlassA, arg2A: UserKlassB) + constructor(arg1B: UserKlassA, arg2B: UserKlassB) + } + + class TestMultipleTypeAliasedValueParameterTypesA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2: UserKlassB) + constructor(arg1: UserKlassA, arg2: SameUserKlassB) + } + + class TestMultipleTypeAliasedValueParameterTypesAReverse { + constructor(arg1: UserKlassA, arg2: UserKlassB) + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2: SameUserKlassB) + } + + class TestMultipleTypeAliasedValueParameterTypesB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2: UserKlassB) + constructor(arg1: SameUserKlassA, arg2: SameUserKlassB) + } + + class TestMultipleTypeAliasedValueParameterTypesBReverse { + constructor(arg1: UserKlassA, arg2: UserKlassB) + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: SameUserKlassA, arg2: SameUserKlassB) + } + + + class TestValueParameterWithIdenticalDefaultArguments { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass = defaultArgument) + constructor(arg: UserKlass = defaultArgument) + } + + class TestDifferencesInValueParameterDefaultArgumentsPresence { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass = defaultArgument) + constructor(arg: UserKlass) + } + + class TestDifferencesInValueParameterDefaultArgumentsPresenceReverse { + constructor(arg: UserKlass = defaultArgument) + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass) + } + + class TestValueParameterWithDifferentDefaultArguments { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass = defaultArgumentA) + constructor(arg: UserKlass = defaultArgumentB) + } + + class TestValueParameterWithAliasedDefaultArguments { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass = defaultArgument) + constructor(arg: UserKlass = sameDefaultArgument) + } + + class TestValueParameterWithAliasedDefaultArgumentsReverse { + constructor(arg: UserKlass = defaultArgument) + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass = sameDefaultArgument) + } + + + class TestIdenticalTypeParametersA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + constructor() + } + + class TestIdenticalTypeParametersB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) + constructor(arg: T) + } + + class TestIdenticalTypeParametersC { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) + constructor(arg: Invariant) + } + + + class TestMultipleIdenticalTypeParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + constructor() + } + + + class TestTypeParameterWithIdenticalUpperBoundsA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + constructor() + } + + class TestTypeParameterWithIdenticalUpperBoundsB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) + constructor(arg: T) + } + + class TestTypeParameterWithIdenticalUpperBoundsC { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) + constructor(arg: Invariant) + } + + + class TestTypeParameterWithMultipleIdenticalUpperBoundsAA where T: UserInterfaceA, T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + constructor() + } + + class TestTypeParameterWithMultipleIdenticalUpperBoundsAB where T: UserInterfaceA, T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) + constructor(arg: T) + } + + class TestTypeParameterWithMultipleIdenticalUpperBoundsAC where T: UserInterfaceA, T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) + constructor(arg: Invariant) + } + + class TestTypeParameterWithMultipleIdenticalUpperBoundsBA where T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + constructor() + } + + class TestTypeParameterWithMultipleIdenticalUpperBoundsBB where T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) + constructor(arg: T) + } + + class TestTypeParameterWithMultipleIdenticalUpperBoundsBC where T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) + constructor(arg: Invariant) + } + + + class TestIdenticalPrivateVisibility { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private constructor() + private constructor() + } + + class TestIdenticalInternalVisibility { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal constructor() + internal constructor() + } + + open class TestIdenticalProtectedVisibility { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) protected constructor() + protected constructor() + } + + class TestDifferencesInPrivateAndPublicVisibilities { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private constructor() + public constructor() + } + + class TestDifferencesInPrivateAndPublicVisibilitiesReverse { + private constructor() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) public constructor() + } + + class TestDifferencesInInternalAndPublicVisibilities { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal constructor() + public constructor() + } + + class TestDifferencesInInternalAndPublicVisibilitiesReverse { + internal constructor() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) public constructor() + } + + open class TestDifferencesInProtectedAndPublicVisibilities { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) protected constructor() + public constructor() + } + + open class TestDifferencesInProtectedAndPublicVisibilitiesReverse { + protected constructor() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) public constructor() + } + + class TestDifferencesInPrivateAndInternalVisibilities { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private constructor() + internal constructor() + } + + class TestDifferencesInPrivateAndInternalVisibilitiesReverse { + private constructor() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal constructor() + } + + open class TestDifferencesInProtectedAndPrivateVisibilities { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) protected constructor() + private constructor() + } + + open class TestDifferencesInProtectedAndPrivateVisibilitiesReverse { + protected constructor() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private constructor() + } + + open class TestDifferencesInProtectedAndInternalVisibilities { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) protected constructor() + internal constructor() + } + + open class TestDifferencesInProtectedAndInternalVisibilitiesReverse { + protected constructor() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal constructor() + } + + +} + + +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 diff --git a/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/ConstructorsInMemberScope.kt b/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/ConstructorsInMemberScope.kt new file mode 100644 index 00000000000..e05182fef86 --- /dev/null +++ b/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/ConstructorsInMemberScope.kt @@ -0,0 +1,289 @@ +// DIAGNOSTICS: -CONFLICTING_JVM_DECLARATIONS, -MISPLACED_TYPE_PARAMETER_CONSTRAINTS + +class MemberScope { + + + class TestBasic { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + constructor() + } + + + class TestIdenticalPrimaryAndSecondaryConstructorsA constructor() { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() : this() + } + + class TestIdenticalPrimaryAndSecondaryConstructorsB() { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() : this() + } + + + class TestIdenticalDelegatedPrimaryConstructorCalls constructor(placeholder: UserKlass) { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() : this(UserKlass()) + constructor() : this(UserKlass()) + } + + + open class SuperConstructorSource constructor(placeholder: UserKlass) + class TestIdenticalDelegatedSuperConstructorCalls: SuperConstructorSource { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() : super(UserKlass()) + constructor() : super(UserKlass()) + } + + + class TestIdenticalValueParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass) + constructor(arg: UserKlass) + } + + class TestDifferentlyNamedValueParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(argA: UserKlass) + constructor(argB: UserKlass) + } + + class TestTypeAliasedValueParameterTypes { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass) + constructor(arg: SameUserKlass) + } + + class TestTypeAliasedValueParameterTypesReverse { + constructor(arg: UserKlass) + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: SameUserKlass) + } + + + class TestMultipleIdenticalValueParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2: UserKlassB) + constructor(arg1: UserKlassA, arg2: UserKlassB) + } + + class TestMultipleDifferentlyNamedValueParametersA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2A: UserKlassB) + constructor(arg1: UserKlassA, arg2B: UserKlassB) + } + + class TestMultipleDifferentlyNamedValueParametersB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1A: UserKlassA, arg2A: UserKlassB) + constructor(arg1B: UserKlassA, arg2B: UserKlassB) + } + + class TestMultipleTypeAliasedValueParameterTypesA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2: UserKlassB) + constructor(arg1: UserKlassA, arg2: SameUserKlassB) + } + + class TestMultipleTypeAliasedValueParameterTypesAReverse { + constructor(arg1: UserKlassA, arg2: UserKlassB) + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2: SameUserKlassB) + } + + class TestMultipleTypeAliasedValueParameterTypesB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2: UserKlassB) + constructor(arg1: SameUserKlassA, arg2: SameUserKlassB) + } + + class TestMultipleTypeAliasedValueParameterTypesBReverse { + constructor(arg1: UserKlassA, arg2: UserKlassB) + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: SameUserKlassA, arg2: SameUserKlassB) + } + + + class TestValueParameterWithIdenticalDefaultArguments { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass = defaultArgument) + constructor(arg: UserKlass = defaultArgument) + } + + class TestDifferencesInValueParameterDefaultArgumentsPresence { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass = defaultArgument) + constructor(arg: UserKlass) + } + + class TestDifferencesInValueParameterDefaultArgumentsPresenceReverse { + constructor(arg: UserKlass = defaultArgument) + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass) + } + + class TestValueParameterWithDifferentDefaultArguments { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass = defaultArgumentA) + constructor(arg: UserKlass = defaultArgumentB) + } + + class TestValueParameterWithAliasedDefaultArguments { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass = defaultArgument) + constructor(arg: UserKlass = sameDefaultArgument) + } + + class TestValueParameterWithAliasedDefaultArgumentsReverse { + constructor(arg: UserKlass = defaultArgument) + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass = sameDefaultArgument) + } + + + class TestIdenticalTypeParametersA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + constructor() + } + + class TestIdenticalTypeParametersB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) + constructor(arg: T) + } + + class TestIdenticalTypeParametersC { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) + constructor(arg: Invariant) + } + + + class TestMultipleIdenticalTypeParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + constructor() + } + + + class TestTypeParameterWithIdenticalUpperBoundsA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + constructor() + } + + class TestTypeParameterWithIdenticalUpperBoundsB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) + constructor(arg: T) + } + + class TestTypeParameterWithIdenticalUpperBoundsC { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) + constructor(arg: Invariant) + } + + + class TestTypeParameterWithMultipleIdenticalUpperBoundsAA where T: UserInterfaceA, T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + constructor() + } + + class TestTypeParameterWithMultipleIdenticalUpperBoundsAB where T: UserInterfaceA, T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) + constructor(arg: T) + } + + class TestTypeParameterWithMultipleIdenticalUpperBoundsAC where T: UserInterfaceA, T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) + constructor(arg: Invariant) + } + + class TestTypeParameterWithMultipleIdenticalUpperBoundsBA where T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + constructor() + } + + class TestTypeParameterWithMultipleIdenticalUpperBoundsBB where T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) + constructor(arg: T) + } + + class TestTypeParameterWithMultipleIdenticalUpperBoundsBC where T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) + constructor(arg: Invariant) + } + + + class TestIdenticalPrivateVisibility { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private constructor() + private constructor() + } + + class TestIdenticalInternalVisibility { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal constructor() + internal constructor() + } + + open class TestIdenticalProtectedVisibility { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) protected constructor() + protected constructor() + } + + class TestDifferencesInPrivateAndPublicVisibilities { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private constructor() + public constructor() + } + + class TestDifferencesInPrivateAndPublicVisibilitiesReverse { + private constructor() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) public constructor() + } + + class TestDifferencesInInternalAndPublicVisibilities { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal constructor() + public constructor() + } + + class TestDifferencesInInternalAndPublicVisibilitiesReverse { + internal constructor() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) public constructor() + } + + open class TestDifferencesInProtectedAndPublicVisibilities { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) protected constructor() + public constructor() + } + + open class TestDifferencesInProtectedAndPublicVisibilitiesReverse { + protected constructor() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) public constructor() + } + + class TestDifferencesInPrivateAndInternalVisibilities { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private constructor() + internal constructor() + } + + class TestDifferencesInPrivateAndInternalVisibilitiesReverse { + private constructor() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal constructor() + } + + open class TestDifferencesInProtectedAndPrivateVisibilities { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) protected constructor() + private constructor() + } + + open class TestDifferencesInProtectedAndPrivateVisibilitiesReverse { + protected constructor() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private constructor() + } + + open class TestDifferencesInProtectedAndInternalVisibilities { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) protected constructor() + internal constructor() + } + + open class TestDifferencesInProtectedAndInternalVisibilitiesReverse { + protected constructor() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal constructor() + } + + +} + + +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 diff --git a/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/ConstructorsInPackage.fir.kt b/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/ConstructorsInPackage.fir.kt new file mode 100644 index 00000000000..999505422e8 --- /dev/null +++ b/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/ConstructorsInPackage.fir.kt @@ -0,0 +1,286 @@ +// DIAGNOSTICS: -CONFLICTING_JVM_DECLARATIONS, -MISPLACED_TYPE_PARAMETER_CONSTRAINTS + +package pkg + + +class TestBasic { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + constructor() +} + + +class TestIdenticalPrimaryAndSecondaryConstructorsA constructor() { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() : this() +} + +class TestIdenticalPrimaryAndSecondaryConstructorsB() { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() : this() +} + + +class TestIdenticalDelegatedPrimaryConstructorCalls constructor(placeholder: UserKlass) { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() : this(UserKlass()) + constructor() : this(UserKlass()) +} + + +open class SuperConstructorSource constructor(placeholder: UserKlass) +class TestIdenticalDelegatedSuperConstructorCalls: SuperConstructorSource { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() : super(UserKlass()) + constructor() : super(UserKlass()) +} + + +class TestIdenticalValueParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass) + constructor(arg: UserKlass) +} + +class TestDifferentlyNamedValueParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(argA: UserKlass) + constructor(argB: UserKlass) +} + +class TestTypeAliasedValueParameterTypes { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass) + constructor(arg: SameUserKlass) +} + +class TestTypeAliasedValueParameterTypesReverse { + constructor(arg: UserKlass) + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: SameUserKlass) +} + + +class TestMultipleIdenticalValueParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2: UserKlassB) + constructor(arg1: UserKlassA, arg2: UserKlassB) +} + +class TestMultipleDifferentlyNamedValueParametersA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2A: UserKlassB) + constructor(arg1: UserKlassA, arg2B: UserKlassB) +} + +class TestMultipleDifferentlyNamedValueParametersB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1A: UserKlassA, arg2A: UserKlassB) + constructor(arg1B: UserKlassA, arg2B: UserKlassB) +} + +class TestMultipleTypeAliasedValueParameterTypesA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2: UserKlassB) + constructor(arg1: UserKlassA, arg2: SameUserKlassB) +} + +class TestMultipleTypeAliasedValueParameterTypesAReverse { + constructor(arg1: UserKlassA, arg2: UserKlassB) + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2: SameUserKlassB) +} + +class TestMultipleTypeAliasedValueParameterTypesB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2: UserKlassB) + constructor(arg1: SameUserKlassA, arg2: SameUserKlassB) +} + +class TestMultipleTypeAliasedValueParameterTypesBReverse { + constructor(arg1: UserKlassA, arg2: UserKlassB) + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: SameUserKlassA, arg2: SameUserKlassB) +} + + +class TestValueParameterWithIdenticalDefaultArguments { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass = defaultArgument) + constructor(arg: UserKlass = defaultArgument) +} + +class TestDifferencesInValueParameterDefaultArgumentsPresence { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass = defaultArgument) + constructor(arg: UserKlass) +} + +class TestDifferencesInValueParameterDefaultArgumentsPresenceReverse { + constructor(arg: UserKlass = defaultArgument) + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass) +} + +class TestValueParameterWithDifferentDefaultArguments { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass = defaultArgumentA) + constructor(arg: UserKlass = defaultArgumentB) +} + +class TestValueParameterWithAliasedDefaultArguments { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass = defaultArgument) + constructor(arg: UserKlass = sameDefaultArgument) +} + +class TestValueParameterWithAliasedDefaultArgumentsReverse { + constructor(arg: UserKlass = defaultArgument) + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass = sameDefaultArgument) +} + + +class TestIdenticalTypeParametersA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + constructor() +} + +class TestIdenticalTypeParametersB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) + constructor(arg: T) +} + +class TestIdenticalTypeParametersC { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) + constructor(arg: Invariant) +} + + +class TestMultipleIdenticalTypeParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + constructor() +} + + +class TestTypeParameterWithIdenticalUpperBoundsA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + constructor() +} + +class TestTypeParameterWithIdenticalUpperBoundsB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) + constructor(arg: T) +} + +class TestTypeParameterWithIdenticalUpperBoundsC { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) + constructor(arg: Invariant) +} + + +class TestTypeParameterWithMultipleIdenticalUpperBoundsAA where T: UserInterfaceA, T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + constructor() +} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsAB where T: UserInterfaceA, T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) + constructor(arg: T) +} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsAC where T: UserInterfaceA, T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) + constructor(arg: Invariant) +} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsBA where T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + constructor() +} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsBB where T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) + constructor(arg: T) +} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsBC where T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) + constructor(arg: Invariant) +} + + +class TestIdenticalPrivateVisibility { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private constructor() + private constructor() +} + +class TestIdenticalInternalVisibility { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal constructor() + internal constructor() +} + +open class TestIdenticalProtectedVisibility { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) protected constructor() + protected constructor() +} + +class TestDifferencesInPrivateAndPublicVisibilities { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private constructor() + public constructor() +} + +class TestDifferencesInPrivateAndPublicVisibilitiesReverse { + private constructor() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) public constructor() +} + +class TestDifferencesInInternalAndPublicVisibilities { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal constructor() + public constructor() +} + +class TestDifferencesInInternalAndPublicVisibilitiesReverse { + internal constructor() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) public constructor() +} + +open class TestDifferencesInProtectedAndPublicVisibilities { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) protected constructor() + public constructor() +} + +open class TestDifferencesInProtectedAndPublicVisibilitiesReverse { + protected constructor() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) public constructor() +} + +class TestDifferencesInPrivateAndInternalVisibilities { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private constructor() + internal constructor() +} + +class TestDifferencesInPrivateAndInternalVisibilitiesReverse { + private constructor() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal constructor() +} + +open class TestDifferencesInProtectedAndPrivateVisibilities { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) protected constructor() + private constructor() +} + +open class TestDifferencesInProtectedAndPrivateVisibilitiesReverse { + protected constructor() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private constructor() +} + +open class TestDifferencesInProtectedAndInternalVisibilities { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) protected constructor() + internal constructor() +} + +open class TestDifferencesInProtectedAndInternalVisibilitiesReverse { + protected constructor() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal constructor() +} + + +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 diff --git a/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/ConstructorsInPackage.kt b/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/ConstructorsInPackage.kt new file mode 100644 index 00000000000..b51d34b546d --- /dev/null +++ b/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/ConstructorsInPackage.kt @@ -0,0 +1,286 @@ +// DIAGNOSTICS: -CONFLICTING_JVM_DECLARATIONS, -MISPLACED_TYPE_PARAMETER_CONSTRAINTS + +package pkg + + +class TestBasic { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + constructor() +} + + +class TestIdenticalPrimaryAndSecondaryConstructorsA constructor() { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() : this() +} + +class TestIdenticalPrimaryAndSecondaryConstructorsB() { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() : this() +} + + +class TestIdenticalDelegatedPrimaryConstructorCalls constructor(placeholder: UserKlass) { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() : this(UserKlass()) + constructor() : this(UserKlass()) +} + + +open class SuperConstructorSource constructor(placeholder: UserKlass) +class TestIdenticalDelegatedSuperConstructorCalls: SuperConstructorSource { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() : super(UserKlass()) + constructor() : super(UserKlass()) +} + + +class TestIdenticalValueParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass) + constructor(arg: UserKlass) +} + +class TestDifferentlyNamedValueParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(argA: UserKlass) + constructor(argB: UserKlass) +} + +class TestTypeAliasedValueParameterTypes { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass) + constructor(arg: SameUserKlass) +} + +class TestTypeAliasedValueParameterTypesReverse { + constructor(arg: UserKlass) + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: SameUserKlass) +} + + +class TestMultipleIdenticalValueParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2: UserKlassB) + constructor(arg1: UserKlassA, arg2: UserKlassB) +} + +class TestMultipleDifferentlyNamedValueParametersA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2A: UserKlassB) + constructor(arg1: UserKlassA, arg2B: UserKlassB) +} + +class TestMultipleDifferentlyNamedValueParametersB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1A: UserKlassA, arg2A: UserKlassB) + constructor(arg1B: UserKlassA, arg2B: UserKlassB) +} + +class TestMultipleTypeAliasedValueParameterTypesA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2: UserKlassB) + constructor(arg1: UserKlassA, arg2: SameUserKlassB) +} + +class TestMultipleTypeAliasedValueParameterTypesAReverse { + constructor(arg1: UserKlassA, arg2: UserKlassB) + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2: SameUserKlassB) +} + +class TestMultipleTypeAliasedValueParameterTypesB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2: UserKlassB) + constructor(arg1: SameUserKlassA, arg2: SameUserKlassB) +} + +class TestMultipleTypeAliasedValueParameterTypesBReverse { + constructor(arg1: UserKlassA, arg2: UserKlassB) + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: SameUserKlassA, arg2: SameUserKlassB) +} + + +class TestValueParameterWithIdenticalDefaultArguments { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass = defaultArgument) + constructor(arg: UserKlass = defaultArgument) +} + +class TestDifferencesInValueParameterDefaultArgumentsPresence { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass = defaultArgument) + constructor(arg: UserKlass) +} + +class TestDifferencesInValueParameterDefaultArgumentsPresenceReverse { + constructor(arg: UserKlass = defaultArgument) + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass) +} + +class TestValueParameterWithDifferentDefaultArguments { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass = defaultArgumentA) + constructor(arg: UserKlass = defaultArgumentB) +} + +class TestValueParameterWithAliasedDefaultArguments { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass = defaultArgument) + constructor(arg: UserKlass = sameDefaultArgument) +} + +class TestValueParameterWithAliasedDefaultArgumentsReverse { + constructor(arg: UserKlass = defaultArgument) + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass = sameDefaultArgument) +} + + +class TestIdenticalTypeParametersA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + constructor() +} + +class TestIdenticalTypeParametersB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) + constructor(arg: T) +} + +class TestIdenticalTypeParametersC { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) + constructor(arg: Invariant) +} + + +class TestMultipleIdenticalTypeParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + constructor() +} + + +class TestTypeParameterWithIdenticalUpperBoundsA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + constructor() +} + +class TestTypeParameterWithIdenticalUpperBoundsB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) + constructor(arg: T) +} + +class TestTypeParameterWithIdenticalUpperBoundsC { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) + constructor(arg: Invariant) +} + + +class TestTypeParameterWithMultipleIdenticalUpperBoundsAA where T: UserInterfaceA, T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + constructor() +} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsAB where T: UserInterfaceA, T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) + constructor(arg: T) +} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsAC where T: UserInterfaceA, T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) + constructor(arg: Invariant) +} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsBA where T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + constructor() +} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsBB where T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) + constructor(arg: T) +} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsBC where T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) + constructor(arg: Invariant) +} + + +class TestIdenticalPrivateVisibility { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private constructor() + private constructor() +} + +class TestIdenticalInternalVisibility { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal constructor() + internal constructor() +} + +open class TestIdenticalProtectedVisibility { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) protected constructor() + protected constructor() +} + +class TestDifferencesInPrivateAndPublicVisibilities { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private constructor() + public constructor() +} + +class TestDifferencesInPrivateAndPublicVisibilitiesReverse { + private constructor() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) public constructor() +} + +class TestDifferencesInInternalAndPublicVisibilities { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal constructor() + public constructor() +} + +class TestDifferencesInInternalAndPublicVisibilitiesReverse { + internal constructor() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) public constructor() +} + +open class TestDifferencesInProtectedAndPublicVisibilities { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) protected constructor() + public constructor() +} + +open class TestDifferencesInProtectedAndPublicVisibilitiesReverse { + protected constructor() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) public constructor() +} + +class TestDifferencesInPrivateAndInternalVisibilities { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private constructor() + internal constructor() +} + +class TestDifferencesInPrivateAndInternalVisibilitiesReverse { + private constructor() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal constructor() +} + +open class TestDifferencesInProtectedAndPrivateVisibilities { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) protected constructor() + private constructor() +} + +open class TestDifferencesInProtectedAndPrivateVisibilitiesReverse { + protected constructor() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private constructor() +} + +open class TestDifferencesInProtectedAndInternalVisibilities { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) protected constructor() + internal constructor() +} + +open class TestDifferencesInProtectedAndInternalVisibilitiesReverse { + protected constructor() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal constructor() +} + + +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 diff --git a/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/ConstructorsOnTopLevel.fir.kt b/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/ConstructorsOnTopLevel.fir.kt new file mode 100644 index 00000000000..fe5721a118c --- /dev/null +++ b/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/ConstructorsOnTopLevel.fir.kt @@ -0,0 +1,284 @@ +// DIAGNOSTICS: -CONFLICTING_JVM_DECLARATIONS, -MISPLACED_TYPE_PARAMETER_CONSTRAINTS + + +class TestBasic { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + constructor() +} + + +class TestIdenticalPrimaryAndSecondaryConstructorsA constructor() { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() : this() +} + +class TestIdenticalPrimaryAndSecondaryConstructorsB() { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() : this() +} + + +class TestIdenticalDelegatedPrimaryConstructorCalls constructor(placeholder: UserKlass) { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() : this(UserKlass()) + constructor() : this(UserKlass()) +} + + +open class SuperConstructorSource constructor(placeholder: UserKlass) +class TestIdenticalDelegatedSuperConstructorCalls: SuperConstructorSource { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() : super(UserKlass()) + constructor() : super(UserKlass()) +} + + +class TestIdenticalValueParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass) + constructor(arg: UserKlass) +} + +class TestDifferentlyNamedValueParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(argA: UserKlass) + constructor(argB: UserKlass) +} + +class TestTypeAliasedValueParameterTypes { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass) + constructor(arg: SameUserKlass) +} + +class TestTypeAliasedValueParameterTypesReverse { + constructor(arg: UserKlass) + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: SameUserKlass) +} + + +class TestMultipleIdenticalValueParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2: UserKlassB) + constructor(arg1: UserKlassA, arg2: UserKlassB) +} + +class TestMultipleDifferentlyNamedValueParametersA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2A: UserKlassB) + constructor(arg1: UserKlassA, arg2B: UserKlassB) +} + +class TestMultipleDifferentlyNamedValueParametersB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1A: UserKlassA, arg2A: UserKlassB) + constructor(arg1B: UserKlassA, arg2B: UserKlassB) +} + +class TestMultipleTypeAliasedValueParameterTypesA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2: UserKlassB) + constructor(arg1: UserKlassA, arg2: SameUserKlassB) +} + +class TestMultipleTypeAliasedValueParameterTypesAReverse { + constructor(arg1: UserKlassA, arg2: UserKlassB) + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2: SameUserKlassB) +} + +class TestMultipleTypeAliasedValueParameterTypesB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2: UserKlassB) + constructor(arg1: SameUserKlassA, arg2: SameUserKlassB) +} + +class TestMultipleTypeAliasedValueParameterTypesBReverse { + constructor(arg1: UserKlassA, arg2: UserKlassB) + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: SameUserKlassA, arg2: SameUserKlassB) +} + + +class TestValueParameterWithIdenticalDefaultArguments { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass = defaultArgument) + constructor(arg: UserKlass = defaultArgument) +} + +class TestDifferencesInValueParameterDefaultArgumentsPresence { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass = defaultArgument) + constructor(arg: UserKlass) +} + +class TestDifferencesInValueParameterDefaultArgumentsPresenceReverse { + constructor(arg: UserKlass = defaultArgument) + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass) +} + +class TestValueParameterWithDifferentDefaultArguments { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass = defaultArgumentA) + constructor(arg: UserKlass = defaultArgumentB) +} + +class TestValueParameterWithAliasedDefaultArguments { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass = defaultArgument) + constructor(arg: UserKlass = sameDefaultArgument) +} + +class TestValueParameterWithAliasedDefaultArgumentsReverse { + constructor(arg: UserKlass = defaultArgument) + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass = sameDefaultArgument) +} + + +class TestIdenticalTypeParametersA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + constructor() +} + +class TestIdenticalTypeParametersB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) + constructor(arg: T) +} + +class TestIdenticalTypeParametersC { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) + constructor(arg: Invariant) +} + + +class TestMultipleIdenticalTypeParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + constructor() +} + + +class TestTypeParameterWithIdenticalUpperBoundsA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + constructor() +} + +class TestTypeParameterWithIdenticalUpperBoundsB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) + constructor(arg: T) +} + +class TestTypeParameterWithIdenticalUpperBoundsC { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) + constructor(arg: Invariant) +} + + +class TestTypeParameterWithMultipleIdenticalUpperBoundsAA where T: UserInterfaceA, T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + constructor() +} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsAB where T: UserInterfaceA, T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) + constructor(arg: T) +} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsAC where T: UserInterfaceA, T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) + constructor(arg: Invariant) +} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsBA where T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + constructor() +} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsBB where T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) + constructor(arg: T) +} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsBC where T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) + constructor(arg: Invariant) +} + + +class TestIdenticalPrivateVisibility { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private constructor() + private constructor() +} + +class TestIdenticalInternalVisibility { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal constructor() + internal constructor() +} + +open class TestIdenticalProtectedVisibility { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) protected constructor() + protected constructor() +} + +class TestDifferencesInPrivateAndPublicVisibilities { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private constructor() + public constructor() +} + +class TestDifferencesInPrivateAndPublicVisibilitiesReverse { + private constructor() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) public constructor() +} + +class TestDifferencesInInternalAndPublicVisibilities { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal constructor() + public constructor() +} + +class TestDifferencesInInternalAndPublicVisibilitiesReverse { + internal constructor() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) public constructor() +} + +open class TestDifferencesInProtectedAndPublicVisibilities { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) protected constructor() + public constructor() +} + +open class TestDifferencesInProtectedAndPublicVisibilitiesReverse { + protected constructor() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) public constructor() +} + +class TestDifferencesInPrivateAndInternalVisibilities { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private constructor() + internal constructor() +} + +class TestDifferencesInPrivateAndInternalVisibilitiesReverse { + private constructor() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal constructor() +} + +open class TestDifferencesInProtectedAndPrivateVisibilities { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) protected constructor() + private constructor() +} + +open class TestDifferencesInProtectedAndPrivateVisibilitiesReverse { + protected constructor() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private constructor() +} + +open class TestDifferencesInProtectedAndInternalVisibilities { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) protected constructor() + internal constructor() +} + +open class TestDifferencesInProtectedAndInternalVisibilitiesReverse { + protected constructor() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal constructor() +} + + +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 diff --git a/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/ConstructorsOnTopLevel.kt b/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/ConstructorsOnTopLevel.kt new file mode 100644 index 00000000000..c5ef46ff5fb --- /dev/null +++ b/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/ConstructorsOnTopLevel.kt @@ -0,0 +1,284 @@ +// DIAGNOSTICS: -CONFLICTING_JVM_DECLARATIONS, -MISPLACED_TYPE_PARAMETER_CONSTRAINTS + + +class TestBasic { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + constructor() +} + + +class TestIdenticalPrimaryAndSecondaryConstructorsA constructor() { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() : this() +} + +class TestIdenticalPrimaryAndSecondaryConstructorsB() { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() : this() +} + + +class TestIdenticalDelegatedPrimaryConstructorCalls constructor(placeholder: UserKlass) { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() : this(UserKlass()) + constructor() : this(UserKlass()) +} + + +open class SuperConstructorSource constructor(placeholder: UserKlass) +class TestIdenticalDelegatedSuperConstructorCalls: SuperConstructorSource { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() : super(UserKlass()) + constructor() : super(UserKlass()) +} + + +class TestIdenticalValueParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass) + constructor(arg: UserKlass) +} + +class TestDifferentlyNamedValueParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(argA: UserKlass) + constructor(argB: UserKlass) +} + +class TestTypeAliasedValueParameterTypes { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass) + constructor(arg: SameUserKlass) +} + +class TestTypeAliasedValueParameterTypesReverse { + constructor(arg: UserKlass) + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: SameUserKlass) +} + + +class TestMultipleIdenticalValueParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2: UserKlassB) + constructor(arg1: UserKlassA, arg2: UserKlassB) +} + +class TestMultipleDifferentlyNamedValueParametersA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2A: UserKlassB) + constructor(arg1: UserKlassA, arg2B: UserKlassB) +} + +class TestMultipleDifferentlyNamedValueParametersB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1A: UserKlassA, arg2A: UserKlassB) + constructor(arg1B: UserKlassA, arg2B: UserKlassB) +} + +class TestMultipleTypeAliasedValueParameterTypesA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2: UserKlassB) + constructor(arg1: UserKlassA, arg2: SameUserKlassB) +} + +class TestMultipleTypeAliasedValueParameterTypesAReverse { + constructor(arg1: UserKlassA, arg2: UserKlassB) + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2: SameUserKlassB) +} + +class TestMultipleTypeAliasedValueParameterTypesB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2: UserKlassB) + constructor(arg1: SameUserKlassA, arg2: SameUserKlassB) +} + +class TestMultipleTypeAliasedValueParameterTypesBReverse { + constructor(arg1: UserKlassA, arg2: UserKlassB) + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: SameUserKlassA, arg2: SameUserKlassB) +} + + +class TestValueParameterWithIdenticalDefaultArguments { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass = defaultArgument) + constructor(arg: UserKlass = defaultArgument) +} + +class TestDifferencesInValueParameterDefaultArgumentsPresence { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass = defaultArgument) + constructor(arg: UserKlass) +} + +class TestDifferencesInValueParameterDefaultArgumentsPresenceReverse { + constructor(arg: UserKlass = defaultArgument) + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass) +} + +class TestValueParameterWithDifferentDefaultArguments { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass = defaultArgumentA) + constructor(arg: UserKlass = defaultArgumentB) +} + +class TestValueParameterWithAliasedDefaultArguments { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass = defaultArgument) + constructor(arg: UserKlass = sameDefaultArgument) +} + +class TestValueParameterWithAliasedDefaultArgumentsReverse { + constructor(arg: UserKlass = defaultArgument) + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass = sameDefaultArgument) +} + + +class TestIdenticalTypeParametersA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + constructor() +} + +class TestIdenticalTypeParametersB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) + constructor(arg: T) +} + +class TestIdenticalTypeParametersC { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) + constructor(arg: Invariant) +} + + +class TestMultipleIdenticalTypeParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + constructor() +} + + +class TestTypeParameterWithIdenticalUpperBoundsA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + constructor() +} + +class TestTypeParameterWithIdenticalUpperBoundsB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) + constructor(arg: T) +} + +class TestTypeParameterWithIdenticalUpperBoundsC { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) + constructor(arg: Invariant) +} + + +class TestTypeParameterWithMultipleIdenticalUpperBoundsAA where T: UserInterfaceA, T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + constructor() +} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsAB where T: UserInterfaceA, T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) + constructor(arg: T) +} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsAC where T: UserInterfaceA, T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) + constructor(arg: Invariant) +} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsBA where T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + constructor() +} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsBB where T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) + constructor(arg: T) +} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsBC where T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) + constructor(arg: Invariant) +} + + +class TestIdenticalPrivateVisibility { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private constructor() + private constructor() +} + +class TestIdenticalInternalVisibility { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal constructor() + internal constructor() +} + +open class TestIdenticalProtectedVisibility { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) protected constructor() + protected constructor() +} + +class TestDifferencesInPrivateAndPublicVisibilities { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private constructor() + public constructor() +} + +class TestDifferencesInPrivateAndPublicVisibilitiesReverse { + private constructor() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) public constructor() +} + +class TestDifferencesInInternalAndPublicVisibilities { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal constructor() + public constructor() +} + +class TestDifferencesInInternalAndPublicVisibilitiesReverse { + internal constructor() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) public constructor() +} + +open class TestDifferencesInProtectedAndPublicVisibilities { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) protected constructor() + public constructor() +} + +open class TestDifferencesInProtectedAndPublicVisibilitiesReverse { + protected constructor() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) public constructor() +} + +class TestDifferencesInPrivateAndInternalVisibilities { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private constructor() + internal constructor() +} + +class TestDifferencesInPrivateAndInternalVisibilitiesReverse { + private constructor() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal constructor() +} + +open class TestDifferencesInProtectedAndPrivateVisibilities { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) protected constructor() + private constructor() +} + +open class TestDifferencesInProtectedAndPrivateVisibilitiesReverse { + protected constructor() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private constructor() +} + +open class TestDifferencesInProtectedAndInternalVisibilities { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) protected constructor() + internal constructor() +} + +open class TestDifferencesInProtectedAndInternalVisibilitiesReverse { + protected constructor() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal constructor() +} + + +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 diff --git a/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/DifferentDeprecationLevels.fir.kt b/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/DifferentDeprecationLevels.fir.kt new file mode 100644 index 00000000000..83cd569eb9f --- /dev/null +++ b/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/DifferentDeprecationLevels.fir.kt @@ -0,0 +1,8 @@ +@Deprecated(message = "", level = DeprecationLevel.WARNING) fun TestWarning() {} +fun TestWarning() {} + +@Deprecated(message = "", level = DeprecationLevel.ERROR) fun TestError() {} +fun TestError() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestHidden() {} +fun TestHidden() {} diff --git a/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/DifferentDeprecationLevels.kt b/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/DifferentDeprecationLevels.kt new file mode 100644 index 00000000000..dafc5fc9cf4 --- /dev/null +++ b/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/DifferentDeprecationLevels.kt @@ -0,0 +1,8 @@ +@Deprecated(message = "", level = DeprecationLevel.WARNING) fun TestWarning() {} +fun TestWarning() {} + +@Deprecated(message = "", level = DeprecationLevel.ERROR) fun TestError() {} +fun TestError() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestHidden() {} +fun TestHidden() {} diff --git a/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/FunctionsAndConstructorsInMemberScope.fir.kt b/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/FunctionsAndConstructorsInMemberScope.fir.kt new file mode 100644 index 00000000000..1fe68aa74a5 --- /dev/null +++ b/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/FunctionsAndConstructorsInMemberScope.fir.kt @@ -0,0 +1,436 @@ +// DIAGNOSTICS: -NOTHING_TO_INLINE, -NO_TAIL_CALLS_FOUND, -MISPLACED_TYPE_PARAMETER_CONSTRAINTS + + +class MemberScope { + + + class TestBasic { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + } + fun TestBasic() {} + + class TestBasicReverse { + constructor() + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestBasicReverse() {} + + + class TestIdenticalReturnTypes { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + } + fun TestIdenticalReturnTypes(): TestIdenticalReturnTypes = TestIdenticalReturnTypes() + + class TestIdenticalReturnTypesReverse { + constructor() + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestIdenticalReturnTypesReverse(): TestIdenticalReturnTypesReverse = TestIdenticalReturnTypesReverse() + + + class TestFunctionWithReifiedTypeParameterVsConstructorA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + } + inline fun TestFunctionWithReifiedTypeParameterVsConstructorA() {} + + class TestFunctionWithReifiedTypeParameterVsConstructorAReverse { + constructor() + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun TestFunctionWithReifiedTypeParameterVsConstructorAReverse() {} + + class TestFunctionWithReifiedTypeParameterVsConstructorB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) + } + inline fun TestFunctionWithReifiedTypeParameterVsConstructorB(arg: T) {} + + class TestFunctionWithReifiedTypeParameterVsConstructorBReverse { + constructor(arg: T) + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun TestFunctionWithReifiedTypeParameterVsConstructorBReverse(arg: T) {} + + class TestFunctionWithReifiedTypeParameterVsConstructorC { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) + } + inline fun TestFunctionWithReifiedTypeParameterVsConstructorC(arg: Invariant) {} + + class TestFunctionWithReifiedTypeParameterVsConstructorCReverse { + constructor(arg: Invariant) + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun TestFunctionWithReifiedTypeParameterVsConstructorCReverse(arg: Invariant) {} + + + class TestInlineFunctionVsConstructor { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + } + inline fun TestInlineFunctionVsConstructor() {} + + class TestInlineFunctionVsConstructorReverse { + constructor() + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun TestInlineFunctionVsConstructorReverse() {} + + + class TestTailrecFunctionVsConstructor { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + } + tailrec fun TestTailrecFunctionVsConstructor() {} + + class TestTailrecFunctionVsConstructorReverse { + constructor() + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) tailrec fun TestTailrecFunctionVsConstructorReverse() {} + + + class TestFunctionVsPrimaryConstructor @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + fun TestFunctionVsPrimaryConstructor() {} + + class TestFunctionVsPrimaryConstructorReverse constructor() {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestFunctionVsPrimaryConstructorReverse() {} + + + class TestFunctionVsDelegatedPrimaryConstructorCall constructor(placeholder: UserKlass) { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() : this(UserKlass()) + } + fun TestFunctionVsDelegatedPrimaryConstructorCall() {} + + class TestFunctionVsDelegatedPrimaryConstructorCallReverse constructor(placeholder: UserKlass) { + constructor() : this(UserKlass()) + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestFunctionVsDelegatedPrimaryConstructorCallReverse() {} + + + open class SuperConstructorSource constructor(placeholder: UserKlass) + + class TestFunctionVsDelegatedSuperConstructorCall: SuperConstructorSource { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() : super(UserKlass()) + } + fun TestFunctionVsDelegatedSuperConstructorCall() {} + + class TestFunctionVsDelegatedSuperConstructorCallReverse: SuperConstructorSource { + constructor() : super(UserKlass()) + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestFunctionVsDelegatedSuperConstructorCallReverse() {} + + + class TestIdenticalValueParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass) + } + fun TestIdenticalValueParameters(arg: UserKlass) {} + + class TestIdenticalValueParametersReverse { + constructor(arg: UserKlass) + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestIdenticalValueParametersReverse(arg: UserKlass) {} + + class TestDifferentlyNamedValueParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(argA: UserKlass) + } + fun TestDifferentlyNamedValueParameters(argB: UserKlass) {} + + class TestDifferentlyNamedValueParametersReverse { + constructor(argA: UserKlass) + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestDifferentlyNamedValueParametersReverse(argB: UserKlass) {} + + class TestTypeAliasedValueParameterTypesA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass) + } + fun TestTypeAliasedValueParameterTypesA(arg: SameUserKlass) {} + + class TestTypeAliasedValueParameterTypesAReverse { + constructor(arg: UserKlass) + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeAliasedValueParameterTypesAReverse(arg: SameUserKlass) {} + + class TestTypeAliasedValueParameterTypesB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: SameUserKlass) + } + fun TestTypeAliasedValueParameterTypesB(arg: UserKlass) {} + + class TestTypeAliasedValueParameterTypesBReverse { + constructor(arg: SameUserKlass) + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeAliasedValueParameterTypesBReverse(arg: UserKlass) {} + + + class TestMultipleIdenticalValueParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2: UserKlassB) + } + fun TestMultipleIdenticalValueParameters(arg1: UserKlassA, arg2: UserKlassB) {} + + class TestMultipleIdenticalValueParametersReverse { + constructor(arg1: UserKlassA, arg2: UserKlassB) + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestMultipleIdenticalValueParametersReverse(arg1: UserKlassA, arg2: UserKlassB) {} + + class TestMultipleDifferentlyNamedValueParametersA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2A: UserKlassB) + } + fun TestMultipleDifferentlyNamedValueParametersA(arg1: UserKlassA, arg2B: UserKlassB) {} + + class TestMultipleDifferentlyNamedValueParametersAReverse { + constructor(arg1: UserKlassA, arg2A: UserKlassB) + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestMultipleDifferentlyNamedValueParametersAReverse(arg1: UserKlassA, arg2B: UserKlassB) {} + + class TestMultipleDifferentlyNamedValueParametersB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1A: UserKlassA, arg2A: UserKlassB) + } + fun TestMultipleDifferentlyNamedValueParametersB(arg1B: UserKlassA, arg2B: UserKlassB) {} + + class TestMultipleDifferentlyNamedValueParametersBReverse { + constructor(arg1A: UserKlassA, arg2A: UserKlassB) + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestMultipleDifferentlyNamedValueParametersBReverse(arg1B: UserKlassA, arg2B: UserKlassB) {} + + class TestMultipleTypeAliasedValueParameterTypesA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2: SameUserKlassB) + } + fun TestMultipleTypeAliasedValueParameterTypesA(arg1: UserKlassA, arg2: SameUserKlassB) {} + + class TestMultipleTypeAliasedValueParameterTypesAReverse { + constructor(arg1: UserKlassA, arg2: SameUserKlassB) + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestMultipleTypeAliasedValueParameterTypesAReverse(arg1: UserKlassA, arg2: SameUserKlassB) {} + + class TestMultipleTypeAliasedValueParameterTypesB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: SameUserKlassA, arg2: SameUserKlassB) + } + fun TestMultipleTypeAliasedValueParameterTypesB(arg1: SameUserKlassA, arg2: SameUserKlassB) {} + + class TestMultipleTypeAliasedValueParameterTypesBReverse { + constructor(arg1: SameUserKlassA, arg2: SameUserKlassB) + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestMultipleTypeAliasedValueParameterTypesBReverse(arg1: SameUserKlassA, arg2: SameUserKlassB) {} + + + class TestIdenticalTypeParametersA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + } + fun TestIdenticalTypeParametersA() {} + + class TestIdenticalTypeParametersAReverse { + constructor() + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestIdenticalTypeParametersAReverse() {} + + class TestIdenticalTypeParametersB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) + } + fun TestIdenticalTypeParametersB(arg: T) {} + + class TestIdenticalTypeParametersBReverse { + constructor(arg: T) + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestIdenticalTypeParametersBReverse(arg: T) {} + + class TestIdenticalTypeParametersC { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) + } + fun TestIdenticalTypeParametersC(arg: Invariant) {} + + class TestIdenticalTypeParametersCReverse { + constructor(arg: Invariant) + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestIdenticalTypeParametersCReverse(arg: Invariant) {} + + + class TestMultipleIdenticalTypeParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + } + fun TestMultipleIdenticalTypeParameters() {} + + class TestMultipleIdenticalTypeParametersReverse { + constructor() + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestMultipleIdenticalTypeParametersReverse() {} + + + class TestTypeParameterWithIdenticalUpperBoundsA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + } + fun TestTypeParameterWithIdenticalUpperBoundsA() {} + + class TestTypeParameterWithIdenticalUpperBoundsAReverse { + constructor() + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithIdenticalUpperBoundsAReverse() {} + + class TestTypeParameterWithIdenticalUpperBoundsB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) + } + fun TestTypeParameterWithIdenticalUpperBoundsB(arg: T) {} + + class TestTypeParameterWithIdenticalUpperBoundsBReverse { + constructor(arg: T) + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithIdenticalUpperBoundsBReverse(arg: T) {} + + class TestTypeParameterWithIdenticalUpperBoundsC { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) + } + fun TestTypeParameterWithIdenticalUpperBoundsC(arg: Invariant) {} + + class TestTypeParameterWithIdenticalUpperBoundsCReverse { + constructor(arg: Invariant) + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithIdenticalUpperBoundsCReverse(arg: Invariant) {} + + + class TestTypeParameterWithMultipleIdenticalUpperBoundsAA where T: UserInterfaceA, T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + } + fun TestTypeParameterWithMultipleIdenticalUpperBoundsAA() where T: UserInterfaceA, T: UserInterfaceB {} + + class TestTypeParameterWithMultipleIdenticalUpperBoundsAAReverse where T: UserInterfaceA, T: UserInterfaceB { + constructor() + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithMultipleIdenticalUpperBoundsAAReverse() where T: UserInterfaceA, T: UserInterfaceB {} + + class TestTypeParameterWithMultipleIdenticalUpperBoundsAB where T: UserInterfaceA, T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) + } + fun TestTypeParameterWithMultipleIdenticalUpperBoundsAB(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} + + class TestTypeParameterWithMultipleIdenticalUpperBoundsABReverse where T: UserInterfaceA, T: UserInterfaceB { + constructor(arg: T) + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithMultipleIdenticalUpperBoundsABReverse(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} + + class TestTypeParameterWithMultipleIdenticalUpperBoundsAC where T: UserInterfaceA, T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) + } + fun TestTypeParameterWithMultipleIdenticalUpperBoundsAC(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} + + class TestTypeParameterWithMultipleIdenticalUpperBoundsACReverse where T: UserInterfaceA, T: UserInterfaceB { + constructor(arg: Invariant) + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithMultipleIdenticalUpperBoundsACReverse(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} + + class TestTypeParameterWithMultipleIdenticalUpperBoundsBA where T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + } + fun TestTypeParameterWithMultipleIdenticalUpperBoundsBA() where T: UserInterfaceB {} + + class TestTypeParameterWithMultipleIdenticalUpperBoundsBAReverse where T: UserInterfaceB { + constructor() + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithMultipleIdenticalUpperBoundsBAReverse() where T: UserInterfaceB {} + + class TestTypeParameterWithMultipleIdenticalUpperBoundsBB where T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) + } + fun TestTypeParameterWithMultipleIdenticalUpperBoundsBB(arg: T) where T: UserInterfaceB {} + + class TestTypeParameterWithMultipleIdenticalUpperBoundsBBReverse where T: UserInterfaceB { + constructor(arg: T) + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithMultipleIdenticalUpperBoundsBBReverse(arg: T) where T: UserInterfaceB {} + + class TestTypeParameterWithMultipleIdenticalUpperBoundsBC where T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) + } + fun TestTypeParameterWithMultipleIdenticalUpperBoundsBC(arg: Invariant) where T: UserInterfaceB {} + + class TestTypeParameterWithMultipleIdenticalUpperBoundsBCReverse where T: UserInterfaceB { + constructor(arg: Invariant) + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithMultipleIdenticalUpperBoundsBCReverse(arg: Invariant) where T: UserInterfaceB {} + + + class TestIdenticalPrivateVisibility { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private constructor() + } + private fun TestIdenticalPrivateVisibility() {} + + class TestIdenticalPrivateVisibilityReverse { + private constructor() + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private fun TestIdenticalPrivateVisibilityReverse() {} + + class TestIdenticalInternalVisibility { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal constructor() + } + internal fun TestIdenticalInternalVisibility() {} + + class TestIdenticalInternalVisibilityReverse { + internal constructor() + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal fun TestIdenticalInternalVisibilityReverse() {} + + class TestDifferencesInPrivateAndPublicVisibilitiesA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private constructor() + } + public fun TestDifferencesInPrivateAndPublicVisibilitiesA() {} + + class TestDifferencesInPrivateAndPublicVisibilitiesAReverse { + private constructor() + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) public fun TestDifferencesInPrivateAndPublicVisibilitiesAReverse() {} + + class TestDifferencesInPrivateAndPublicVisibilitiesB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) public constructor() + } + private fun TestDifferencesInPrivateAndPublicVisibilitiesB() {} + + class TestDifferencesInPrivateAndPublicVisibilitiesBReverse { + public constructor() + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private fun TestDifferencesInPrivateAndPublicVisibilitiesBReverse() {} + + class TestDifferencesInInternalAndPublicVisibilitiesA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal constructor() + } + public fun TestDifferencesInInternalAndPublicVisibilitiesA() {} + + class TestDifferencesInInternalAndPublicVisibilitiesAReverse { + internal constructor() + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) public fun TestDifferencesInInternalAndPublicVisibilitiesAReverse() {} + + class TestDifferencesInInternalAndPublicVisibilitiesB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) public constructor() + } + internal fun TestDifferencesInInternalAndPublicVisibilitiesB() {} + + class TestDifferencesInInternalAndPublicVisibilitiesBReverse { + public constructor() + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal fun TestDifferencesInInternalAndPublicVisibilitiesBReverse() {} + + class TestDifferencesInPrivateAndInternalVisibilitiesA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private constructor() + } + internal fun TestDifferencesInPrivateAndInternalVisibilitiesA() {} + + class TestDifferencesInPrivateAndInternalVisibilitiesAReverse { + private constructor() + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal fun TestDifferencesInPrivateAndInternalVisibilitiesAReverse() {} + + class TestDifferencesInPrivateAndInternalVisibilitiesB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal constructor() + } + private fun TestDifferencesInPrivateAndInternalVisibilitiesB() {} + + class TestDifferencesInPrivateAndInternalVisibilitiesBReverse { + internal constructor() + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private fun TestDifferencesInPrivateAndInternalVisibilitiesBReverse() {} + + +} + + +open class Invariant + + +class UserKlass +class UserKlassA +class UserKlassB +typealias SameUserKlass = UserKlass +typealias SameUserKlassA = UserKlassA +typealias SameUserKlassB = UserKlassB + + +interface UserInterface +interface UserInterfaceA +interface UserInterfaceB diff --git a/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/FunctionsAndConstructorsInMemberScope.kt b/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/FunctionsAndConstructorsInMemberScope.kt new file mode 100644 index 00000000000..f1c866c6294 --- /dev/null +++ b/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/FunctionsAndConstructorsInMemberScope.kt @@ -0,0 +1,436 @@ +// DIAGNOSTICS: -NOTHING_TO_INLINE, -NO_TAIL_CALLS_FOUND, -MISPLACED_TYPE_PARAMETER_CONSTRAINTS + + +class MemberScope { + + + class TestBasic { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + } + fun TestBasic() {} + + class TestBasicReverse { + constructor() + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestBasicReverse() {} + + + class TestIdenticalReturnTypes { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + } + fun TestIdenticalReturnTypes(): TestIdenticalReturnTypes = TestIdenticalReturnTypes() + + class TestIdenticalReturnTypesReverse { + constructor() + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestIdenticalReturnTypesReverse(): TestIdenticalReturnTypesReverse = TestIdenticalReturnTypesReverse() + + + class TestFunctionWithReifiedTypeParameterVsConstructorA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + } + inline fun TestFunctionWithReifiedTypeParameterVsConstructorA() {} + + class TestFunctionWithReifiedTypeParameterVsConstructorAReverse { + constructor() + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun TestFunctionWithReifiedTypeParameterVsConstructorAReverse() {} + + class TestFunctionWithReifiedTypeParameterVsConstructorB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) + } + inline fun TestFunctionWithReifiedTypeParameterVsConstructorB(arg: T) {} + + class TestFunctionWithReifiedTypeParameterVsConstructorBReverse { + constructor(arg: T) + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun TestFunctionWithReifiedTypeParameterVsConstructorBReverse(arg: T) {} + + class TestFunctionWithReifiedTypeParameterVsConstructorC { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) + } + inline fun TestFunctionWithReifiedTypeParameterVsConstructorC(arg: Invariant) {} + + class TestFunctionWithReifiedTypeParameterVsConstructorCReverse { + constructor(arg: Invariant) + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun TestFunctionWithReifiedTypeParameterVsConstructorCReverse(arg: Invariant) {} + + + class TestInlineFunctionVsConstructor { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + } + inline fun TestInlineFunctionVsConstructor() {} + + class TestInlineFunctionVsConstructorReverse { + constructor() + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun TestInlineFunctionVsConstructorReverse() {} + + + class TestTailrecFunctionVsConstructor { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + } + tailrec fun TestTailrecFunctionVsConstructor() {} + + class TestTailrecFunctionVsConstructorReverse { + constructor() + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) tailrec fun TestTailrecFunctionVsConstructorReverse() {} + + + class TestFunctionVsPrimaryConstructor @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + fun TestFunctionVsPrimaryConstructor() {} + + class TestFunctionVsPrimaryConstructorReverse constructor() {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestFunctionVsPrimaryConstructorReverse() {} + + + class TestFunctionVsDelegatedPrimaryConstructorCall constructor(placeholder: UserKlass) { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() : this(UserKlass()) + } + fun TestFunctionVsDelegatedPrimaryConstructorCall() {} + + class TestFunctionVsDelegatedPrimaryConstructorCallReverse constructor(placeholder: UserKlass) { + constructor() : this(UserKlass()) + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestFunctionVsDelegatedPrimaryConstructorCallReverse() {} + + + open class SuperConstructorSource constructor(placeholder: UserKlass) + + class TestFunctionVsDelegatedSuperConstructorCall: SuperConstructorSource { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() : super(UserKlass()) + } + fun TestFunctionVsDelegatedSuperConstructorCall() {} + + class TestFunctionVsDelegatedSuperConstructorCallReverse: SuperConstructorSource { + constructor() : super(UserKlass()) + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestFunctionVsDelegatedSuperConstructorCallReverse() {} + + + class TestIdenticalValueParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass) + } + fun TestIdenticalValueParameters(arg: UserKlass) {} + + class TestIdenticalValueParametersReverse { + constructor(arg: UserKlass) + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestIdenticalValueParametersReverse(arg: UserKlass) {} + + class TestDifferentlyNamedValueParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(argA: UserKlass) + } + fun TestDifferentlyNamedValueParameters(argB: UserKlass) {} + + class TestDifferentlyNamedValueParametersReverse { + constructor(argA: UserKlass) + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestDifferentlyNamedValueParametersReverse(argB: UserKlass) {} + + class TestTypeAliasedValueParameterTypesA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass) + } + fun TestTypeAliasedValueParameterTypesA(arg: SameUserKlass) {} + + class TestTypeAliasedValueParameterTypesAReverse { + constructor(arg: UserKlass) + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeAliasedValueParameterTypesAReverse(arg: SameUserKlass) {} + + class TestTypeAliasedValueParameterTypesB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: SameUserKlass) + } + fun TestTypeAliasedValueParameterTypesB(arg: UserKlass) {} + + class TestTypeAliasedValueParameterTypesBReverse { + constructor(arg: SameUserKlass) + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeAliasedValueParameterTypesBReverse(arg: UserKlass) {} + + + class TestMultipleIdenticalValueParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2: UserKlassB) + } + fun TestMultipleIdenticalValueParameters(arg1: UserKlassA, arg2: UserKlassB) {} + + class TestMultipleIdenticalValueParametersReverse { + constructor(arg1: UserKlassA, arg2: UserKlassB) + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestMultipleIdenticalValueParametersReverse(arg1: UserKlassA, arg2: UserKlassB) {} + + class TestMultipleDifferentlyNamedValueParametersA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2A: UserKlassB) + } + fun TestMultipleDifferentlyNamedValueParametersA(arg1: UserKlassA, arg2B: UserKlassB) {} + + class TestMultipleDifferentlyNamedValueParametersAReverse { + constructor(arg1: UserKlassA, arg2A: UserKlassB) + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestMultipleDifferentlyNamedValueParametersAReverse(arg1: UserKlassA, arg2B: UserKlassB) {} + + class TestMultipleDifferentlyNamedValueParametersB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1A: UserKlassA, arg2A: UserKlassB) + } + fun TestMultipleDifferentlyNamedValueParametersB(arg1B: UserKlassA, arg2B: UserKlassB) {} + + class TestMultipleDifferentlyNamedValueParametersBReverse { + constructor(arg1A: UserKlassA, arg2A: UserKlassB) + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestMultipleDifferentlyNamedValueParametersBReverse(arg1B: UserKlassA, arg2B: UserKlassB) {} + + class TestMultipleTypeAliasedValueParameterTypesA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2: SameUserKlassB) + } + fun TestMultipleTypeAliasedValueParameterTypesA(arg1: UserKlassA, arg2: SameUserKlassB) {} + + class TestMultipleTypeAliasedValueParameterTypesAReverse { + constructor(arg1: UserKlassA, arg2: SameUserKlassB) + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestMultipleTypeAliasedValueParameterTypesAReverse(arg1: UserKlassA, arg2: SameUserKlassB) {} + + class TestMultipleTypeAliasedValueParameterTypesB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: SameUserKlassA, arg2: SameUserKlassB) + } + fun TestMultipleTypeAliasedValueParameterTypesB(arg1: SameUserKlassA, arg2: SameUserKlassB) {} + + class TestMultipleTypeAliasedValueParameterTypesBReverse { + constructor(arg1: SameUserKlassA, arg2: SameUserKlassB) + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestMultipleTypeAliasedValueParameterTypesBReverse(arg1: SameUserKlassA, arg2: SameUserKlassB) {} + + + class TestIdenticalTypeParametersA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + } + fun TestIdenticalTypeParametersA() {} + + class TestIdenticalTypeParametersAReverse { + constructor() + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestIdenticalTypeParametersAReverse() {} + + class TestIdenticalTypeParametersB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) + } + fun TestIdenticalTypeParametersB(arg: T) {} + + class TestIdenticalTypeParametersBReverse { + constructor(arg: T) + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestIdenticalTypeParametersBReverse(arg: T) {} + + class TestIdenticalTypeParametersC { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) + } + fun TestIdenticalTypeParametersC(arg: Invariant) {} + + class TestIdenticalTypeParametersCReverse { + constructor(arg: Invariant) + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestIdenticalTypeParametersCReverse(arg: Invariant) {} + + + class TestMultipleIdenticalTypeParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + } + fun TestMultipleIdenticalTypeParameters() {} + + class TestMultipleIdenticalTypeParametersReverse { + constructor() + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestMultipleIdenticalTypeParametersReverse() {} + + + class TestTypeParameterWithIdenticalUpperBoundsA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + } + fun TestTypeParameterWithIdenticalUpperBoundsA() {} + + class TestTypeParameterWithIdenticalUpperBoundsAReverse { + constructor() + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithIdenticalUpperBoundsAReverse() {} + + class TestTypeParameterWithIdenticalUpperBoundsB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) + } + fun TestTypeParameterWithIdenticalUpperBoundsB(arg: T) {} + + class TestTypeParameterWithIdenticalUpperBoundsBReverse { + constructor(arg: T) + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithIdenticalUpperBoundsBReverse(arg: T) {} + + class TestTypeParameterWithIdenticalUpperBoundsC { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) + } + fun TestTypeParameterWithIdenticalUpperBoundsC(arg: Invariant) {} + + class TestTypeParameterWithIdenticalUpperBoundsCReverse { + constructor(arg: Invariant) + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithIdenticalUpperBoundsCReverse(arg: Invariant) {} + + + class TestTypeParameterWithMultipleIdenticalUpperBoundsAA where T: UserInterfaceA, T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + } + fun TestTypeParameterWithMultipleIdenticalUpperBoundsAA() where T: UserInterfaceA, T: UserInterfaceB {} + + class TestTypeParameterWithMultipleIdenticalUpperBoundsAAReverse where T: UserInterfaceA, T: UserInterfaceB { + constructor() + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithMultipleIdenticalUpperBoundsAAReverse() where T: UserInterfaceA, T: UserInterfaceB {} + + class TestTypeParameterWithMultipleIdenticalUpperBoundsAB where T: UserInterfaceA, T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) + } + fun TestTypeParameterWithMultipleIdenticalUpperBoundsAB(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} + + class TestTypeParameterWithMultipleIdenticalUpperBoundsABReverse where T: UserInterfaceA, T: UserInterfaceB { + constructor(arg: T) + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithMultipleIdenticalUpperBoundsABReverse(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} + + class TestTypeParameterWithMultipleIdenticalUpperBoundsAC where T: UserInterfaceA, T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) + } + fun TestTypeParameterWithMultipleIdenticalUpperBoundsAC(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} + + class TestTypeParameterWithMultipleIdenticalUpperBoundsACReverse where T: UserInterfaceA, T: UserInterfaceB { + constructor(arg: Invariant) + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithMultipleIdenticalUpperBoundsACReverse(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} + + class TestTypeParameterWithMultipleIdenticalUpperBoundsBA where T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() + } + fun TestTypeParameterWithMultipleIdenticalUpperBoundsBA() where T: UserInterfaceB {} + + class TestTypeParameterWithMultipleIdenticalUpperBoundsBAReverse where T: UserInterfaceB { + constructor() + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithMultipleIdenticalUpperBoundsBAReverse() where T: UserInterfaceB {} + + class TestTypeParameterWithMultipleIdenticalUpperBoundsBB where T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) + } + fun TestTypeParameterWithMultipleIdenticalUpperBoundsBB(arg: T) where T: UserInterfaceB {} + + class TestTypeParameterWithMultipleIdenticalUpperBoundsBBReverse where T: UserInterfaceB { + constructor(arg: T) + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithMultipleIdenticalUpperBoundsBBReverse(arg: T) where T: UserInterfaceB {} + + class TestTypeParameterWithMultipleIdenticalUpperBoundsBC where T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) + } + fun TestTypeParameterWithMultipleIdenticalUpperBoundsBC(arg: Invariant) where T: UserInterfaceB {} + + class TestTypeParameterWithMultipleIdenticalUpperBoundsBCReverse where T: UserInterfaceB { + constructor(arg: Invariant) + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithMultipleIdenticalUpperBoundsBCReverse(arg: Invariant) where T: UserInterfaceB {} + + + class TestIdenticalPrivateVisibility { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private constructor() + } + private fun TestIdenticalPrivateVisibility() {} + + class TestIdenticalPrivateVisibilityReverse { + private constructor() + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private fun TestIdenticalPrivateVisibilityReverse() {} + + class TestIdenticalInternalVisibility { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal constructor() + } + internal fun TestIdenticalInternalVisibility() {} + + class TestIdenticalInternalVisibilityReverse { + internal constructor() + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal fun TestIdenticalInternalVisibilityReverse() {} + + class TestDifferencesInPrivateAndPublicVisibilitiesA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private constructor() + } + public fun TestDifferencesInPrivateAndPublicVisibilitiesA() {} + + class TestDifferencesInPrivateAndPublicVisibilitiesAReverse { + private constructor() + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) public fun TestDifferencesInPrivateAndPublicVisibilitiesAReverse() {} + + class TestDifferencesInPrivateAndPublicVisibilitiesB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) public constructor() + } + private fun TestDifferencesInPrivateAndPublicVisibilitiesB() {} + + class TestDifferencesInPrivateAndPublicVisibilitiesBReverse { + public constructor() + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private fun TestDifferencesInPrivateAndPublicVisibilitiesBReverse() {} + + class TestDifferencesInInternalAndPublicVisibilitiesA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal constructor() + } + public fun TestDifferencesInInternalAndPublicVisibilitiesA() {} + + class TestDifferencesInInternalAndPublicVisibilitiesAReverse { + internal constructor() + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) public fun TestDifferencesInInternalAndPublicVisibilitiesAReverse() {} + + class TestDifferencesInInternalAndPublicVisibilitiesB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) public constructor() + } + internal fun TestDifferencesInInternalAndPublicVisibilitiesB() {} + + class TestDifferencesInInternalAndPublicVisibilitiesBReverse { + public constructor() + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal fun TestDifferencesInInternalAndPublicVisibilitiesBReverse() {} + + class TestDifferencesInPrivateAndInternalVisibilitiesA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private constructor() + } + internal fun TestDifferencesInPrivateAndInternalVisibilitiesA() {} + + class TestDifferencesInPrivateAndInternalVisibilitiesAReverse { + private constructor() + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal fun TestDifferencesInPrivateAndInternalVisibilitiesAReverse() {} + + class TestDifferencesInPrivateAndInternalVisibilitiesB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal constructor() + } + private fun TestDifferencesInPrivateAndInternalVisibilitiesB() {} + + class TestDifferencesInPrivateAndInternalVisibilitiesBReverse { + internal constructor() + } + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private fun TestDifferencesInPrivateAndInternalVisibilitiesBReverse() {} + + +} + + +open class Invariant + + +class UserKlass +class UserKlassA +class UserKlassB +typealias SameUserKlass = UserKlass +typealias SameUserKlassA = UserKlassA +typealias SameUserKlassB = UserKlassB + + +interface UserInterface +interface UserInterfaceA +interface UserInterfaceB diff --git a/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/FunctionsAndConstructorsInPackage.fir.kt b/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/FunctionsAndConstructorsInPackage.fir.kt new file mode 100644 index 00000000000..c3ac0cf7313 --- /dev/null +++ b/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/FunctionsAndConstructorsInPackage.fir.kt @@ -0,0 +1,432 @@ +// DIAGNOSTICS: -NOTHING_TO_INLINE, -NO_TAIL_CALLS_FOUND, -MISPLACED_TYPE_PARAMETER_CONSTRAINTS + +package pkg + + +class TestBasic { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() +} +fun TestBasic() {} + +class TestBasicReverse { + constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestBasicReverse() {} + + +class TestIdenticalReturnTypes { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() +} +fun TestIdenticalReturnTypes(): TestIdenticalReturnTypes = TestIdenticalReturnTypes() + +class TestIdenticalReturnTypesReverse { + constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestIdenticalReturnTypesReverse(): TestIdenticalReturnTypesReverse = TestIdenticalReturnTypesReverse() + + +class TestFunctionWithReifiedTypeParameterVsConstructorA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() +} +inline fun TestFunctionWithReifiedTypeParameterVsConstructorA() {} + +class TestFunctionWithReifiedTypeParameterVsConstructorAReverse { + constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun TestFunctionWithReifiedTypeParameterVsConstructorAReverse() {} + +class TestFunctionWithReifiedTypeParameterVsConstructorB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) +} +inline fun TestFunctionWithReifiedTypeParameterVsConstructorB(arg: T) {} + +class TestFunctionWithReifiedTypeParameterVsConstructorBReverse { + constructor(arg: T) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun TestFunctionWithReifiedTypeParameterVsConstructorBReverse(arg: T) {} + +class TestFunctionWithReifiedTypeParameterVsConstructorC { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) +} +inline fun TestFunctionWithReifiedTypeParameterVsConstructorC(arg: Invariant) {} + +class TestFunctionWithReifiedTypeParameterVsConstructorCReverse { + constructor(arg: Invariant) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun TestFunctionWithReifiedTypeParameterVsConstructorCReverse(arg: Invariant) {} + + +class TestInlineFunctionVsConstructor { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() +} +inline fun TestInlineFunctionVsConstructor() {} + +class TestInlineFunctionVsConstructorReverse { + constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun TestInlineFunctionVsConstructorReverse() {} + + +class TestTailrecFunctionVsConstructor { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() +} +tailrec fun TestTailrecFunctionVsConstructor() {} + +class TestTailrecFunctionVsConstructorReverse { + constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) tailrec fun TestTailrecFunctionVsConstructorReverse() {} + + +class TestFunctionVsPrimaryConstructor @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() +fun TestFunctionVsPrimaryConstructor() {} + +class TestFunctionVsPrimaryConstructorReverse constructor() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestFunctionVsPrimaryConstructorReverse() {} + + +class TestFunctionVsDelegatedPrimaryConstructorCall constructor(placeholder: UserKlass) { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() : this(UserKlass()) +} +fun TestFunctionVsDelegatedPrimaryConstructorCall() {} + +class TestFunctionVsDelegatedPrimaryConstructorCallReverse constructor(placeholder: UserKlass) { + constructor() : this(UserKlass()) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestFunctionVsDelegatedPrimaryConstructorCallReverse() {} + + +open class SuperConstructorSource constructor(placeholder: UserKlass) + +class TestFunctionVsDelegatedSuperConstructorCall: SuperConstructorSource { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() : super(UserKlass()) +} +fun TestFunctionVsDelegatedSuperConstructorCall() {} + +class TestFunctionVsDelegatedSuperConstructorCallReverse: SuperConstructorSource { + constructor() : super(UserKlass()) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestFunctionVsDelegatedSuperConstructorCallReverse() {} + + +class TestIdenticalValueParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass) +} +fun TestIdenticalValueParameters(arg: UserKlass) {} + +class TestIdenticalValueParametersReverse { + constructor(arg: UserKlass) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestIdenticalValueParametersReverse(arg: UserKlass) {} + +class TestDifferentlyNamedValueParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(argA: UserKlass) +} +fun TestDifferentlyNamedValueParameters(argB: UserKlass) {} + +class TestDifferentlyNamedValueParametersReverse { + constructor(argA: UserKlass) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestDifferentlyNamedValueParametersReverse(argB: UserKlass) {} + +class TestTypeAliasedValueParameterTypesA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass) +} +fun TestTypeAliasedValueParameterTypesA(arg: SameUserKlass) {} + +class TestTypeAliasedValueParameterTypesAReverse { + constructor(arg: UserKlass) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeAliasedValueParameterTypesAReverse(arg: SameUserKlass) {} + +class TestTypeAliasedValueParameterTypesB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: SameUserKlass) +} +fun TestTypeAliasedValueParameterTypesB(arg: UserKlass) {} + +class TestTypeAliasedValueParameterTypesBReverse { + constructor(arg: SameUserKlass) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeAliasedValueParameterTypesBReverse(arg: UserKlass) {} + + +class TestMultipleIdenticalValueParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2: UserKlassB) +} +fun TestMultipleIdenticalValueParameters(arg1: UserKlassA, arg2: UserKlassB) {} + +class TestMultipleIdenticalValueParametersReverse { + constructor(arg1: UserKlassA, arg2: UserKlassB) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestMultipleIdenticalValueParametersReverse(arg1: UserKlassA, arg2: UserKlassB) {} + +class TestMultipleDifferentlyNamedValueParametersA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2A: UserKlassB) +} +fun TestMultipleDifferentlyNamedValueParametersA(arg1: UserKlassA, arg2B: UserKlassB) {} + +class TestMultipleDifferentlyNamedValueParametersAReverse { + constructor(arg1: UserKlassA, arg2A: UserKlassB) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestMultipleDifferentlyNamedValueParametersAReverse(arg1: UserKlassA, arg2B: UserKlassB) {} + +class TestMultipleDifferentlyNamedValueParametersB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1A: UserKlassA, arg2A: UserKlassB) +} +fun TestMultipleDifferentlyNamedValueParametersB(arg1B: UserKlassA, arg2B: UserKlassB) {} + +class TestMultipleDifferentlyNamedValueParametersBReverse { + constructor(arg1A: UserKlassA, arg2A: UserKlassB) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestMultipleDifferentlyNamedValueParametersBReverse(arg1B: UserKlassA, arg2B: UserKlassB) {} + +class TestMultipleTypeAliasedValueParameterTypesA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2: SameUserKlassB) +} +fun TestMultipleTypeAliasedValueParameterTypesA(arg1: UserKlassA, arg2: SameUserKlassB) {} + +class TestMultipleTypeAliasedValueParameterTypesAReverse { + constructor(arg1: UserKlassA, arg2: SameUserKlassB) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestMultipleTypeAliasedValueParameterTypesAReverse(arg1: UserKlassA, arg2: SameUserKlassB) {} + +class TestMultipleTypeAliasedValueParameterTypesB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: SameUserKlassA, arg2: SameUserKlassB) +} +fun TestMultipleTypeAliasedValueParameterTypesB(arg1: SameUserKlassA, arg2: SameUserKlassB) {} + +class TestMultipleTypeAliasedValueParameterTypesBReverse { + constructor(arg1: SameUserKlassA, arg2: SameUserKlassB) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestMultipleTypeAliasedValueParameterTypesBReverse(arg1: SameUserKlassA, arg2: SameUserKlassB) {} + + +class TestIdenticalTypeParametersA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() +} +fun TestIdenticalTypeParametersA() {} + +class TestIdenticalTypeParametersAReverse { + constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestIdenticalTypeParametersAReverse() {} + +class TestIdenticalTypeParametersB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) +} +fun TestIdenticalTypeParametersB(arg: T) {} + +class TestIdenticalTypeParametersBReverse { + constructor(arg: T) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestIdenticalTypeParametersBReverse(arg: T) {} + +class TestIdenticalTypeParametersC { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) +} +fun TestIdenticalTypeParametersC(arg: Invariant) {} + +class TestIdenticalTypeParametersCReverse { + constructor(arg: Invariant) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestIdenticalTypeParametersCReverse(arg: Invariant) {} + + +class TestMultipleIdenticalTypeParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() +} +fun TestMultipleIdenticalTypeParameters() {} + +class TestMultipleIdenticalTypeParametersReverse { + constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestMultipleIdenticalTypeParametersReverse() {} + + +class TestTypeParameterWithIdenticalUpperBoundsA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() +} +fun TestTypeParameterWithIdenticalUpperBoundsA() {} + +class TestTypeParameterWithIdenticalUpperBoundsAReverse { + constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithIdenticalUpperBoundsAReverse() {} + +class TestTypeParameterWithIdenticalUpperBoundsB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) +} +fun TestTypeParameterWithIdenticalUpperBoundsB(arg: T) {} + +class TestTypeParameterWithIdenticalUpperBoundsBReverse { + constructor(arg: T) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithIdenticalUpperBoundsBReverse(arg: T) {} + +class TestTypeParameterWithIdenticalUpperBoundsC { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) +} +fun TestTypeParameterWithIdenticalUpperBoundsC(arg: Invariant) {} + +class TestTypeParameterWithIdenticalUpperBoundsCReverse { + constructor(arg: Invariant) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithIdenticalUpperBoundsCReverse(arg: Invariant) {} + + +class TestTypeParameterWithMultipleIdenticalUpperBoundsAA where T: UserInterfaceA, T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() +} +fun TestTypeParameterWithMultipleIdenticalUpperBoundsAA() where T: UserInterfaceA, T: UserInterfaceB {} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsAAReverse where T: UserInterfaceA, T: UserInterfaceB { + constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithMultipleIdenticalUpperBoundsAAReverse() where T: UserInterfaceA, T: UserInterfaceB {} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsAB where T: UserInterfaceA, T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) +} +fun TestTypeParameterWithMultipleIdenticalUpperBoundsAB(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsABReverse where T: UserInterfaceA, T: UserInterfaceB { + constructor(arg: T) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithMultipleIdenticalUpperBoundsABReverse(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsAC where T: UserInterfaceA, T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) +} +fun TestTypeParameterWithMultipleIdenticalUpperBoundsAC(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsACReverse where T: UserInterfaceA, T: UserInterfaceB { + constructor(arg: Invariant) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithMultipleIdenticalUpperBoundsACReverse(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsBA where T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() +} +fun TestTypeParameterWithMultipleIdenticalUpperBoundsBA() where T: UserInterfaceB {} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsBAReverse where T: UserInterfaceB { + constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithMultipleIdenticalUpperBoundsBAReverse() where T: UserInterfaceB {} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsBB where T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) +} +fun TestTypeParameterWithMultipleIdenticalUpperBoundsBB(arg: T) where T: UserInterfaceB {} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsBBReverse where T: UserInterfaceB { + constructor(arg: T) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithMultipleIdenticalUpperBoundsBBReverse(arg: T) where T: UserInterfaceB {} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsBC where T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) +} +fun TestTypeParameterWithMultipleIdenticalUpperBoundsBC(arg: Invariant) where T: UserInterfaceB {} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsBCReverse where T: UserInterfaceB { + constructor(arg: Invariant) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithMultipleIdenticalUpperBoundsBCReverse(arg: Invariant) where T: UserInterfaceB {} + + +class TestIdenticalPrivateVisibility { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private constructor() +} +private fun TestIdenticalPrivateVisibility() {} + +class TestIdenticalPrivateVisibilityReverse { + private constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) private fun TestIdenticalPrivateVisibilityReverse() {} + +class TestIdenticalInternalVisibility { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal constructor() +} +internal fun TestIdenticalInternalVisibility() {} + +class TestIdenticalInternalVisibilityReverse { + internal constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal fun TestIdenticalInternalVisibilityReverse() {} + +class TestDifferencesInPrivateAndPublicVisibilitiesA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private constructor() +} +public fun TestDifferencesInPrivateAndPublicVisibilitiesA() {} + +class TestDifferencesInPrivateAndPublicVisibilitiesAReverse { + private constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) public fun TestDifferencesInPrivateAndPublicVisibilitiesAReverse() {} + +class TestDifferencesInPrivateAndPublicVisibilitiesB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) public constructor() +} +private fun TestDifferencesInPrivateAndPublicVisibilitiesB() {} + +class TestDifferencesInPrivateAndPublicVisibilitiesBReverse { + public constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) private fun TestDifferencesInPrivateAndPublicVisibilitiesBReverse() {} + +class TestDifferencesInInternalAndPublicVisibilitiesA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal constructor() +} +public fun TestDifferencesInInternalAndPublicVisibilitiesA() {} + +class TestDifferencesInInternalAndPublicVisibilitiesAReverse { + internal constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) public fun TestDifferencesInInternalAndPublicVisibilitiesAReverse() {} + +class TestDifferencesInInternalAndPublicVisibilitiesB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) public constructor() +} +internal fun TestDifferencesInInternalAndPublicVisibilitiesB() {} + +class TestDifferencesInInternalAndPublicVisibilitiesBReverse { + public constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal fun TestDifferencesInInternalAndPublicVisibilitiesBReverse() {} + +class TestDifferencesInPrivateAndInternalVisibilitiesA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private constructor() +} +internal fun TestDifferencesInPrivateAndInternalVisibilitiesA() {} + +class TestDifferencesInPrivateAndInternalVisibilitiesAReverse { + private constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal fun TestDifferencesInPrivateAndInternalVisibilitiesAReverse() {} + +class TestDifferencesInPrivateAndInternalVisibilitiesB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal constructor() +} +private fun TestDifferencesInPrivateAndInternalVisibilitiesB() {} + +class TestDifferencesInPrivateAndInternalVisibilitiesBReverse { + internal constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) private fun TestDifferencesInPrivateAndInternalVisibilitiesBReverse() {} + + +open class Invariant + + +class UserKlass +class UserKlassA +class UserKlassB +typealias SameUserKlass = UserKlass +typealias SameUserKlassA = UserKlassA +typealias SameUserKlassB = UserKlassB + + +interface UserInterface +interface UserInterfaceA +interface UserInterfaceB diff --git a/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/FunctionsAndConstructorsInPackage.kt b/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/FunctionsAndConstructorsInPackage.kt new file mode 100644 index 00000000000..bf7817cebd1 --- /dev/null +++ b/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/FunctionsAndConstructorsInPackage.kt @@ -0,0 +1,432 @@ +// DIAGNOSTICS: -NOTHING_TO_INLINE, -NO_TAIL_CALLS_FOUND, -MISPLACED_TYPE_PARAMETER_CONSTRAINTS + +package pkg + + +class TestBasic { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() +} +fun TestBasic() {} + +class TestBasicReverse { + constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestBasicReverse() {} + + +class TestIdenticalReturnTypes { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() +} +fun TestIdenticalReturnTypes(): TestIdenticalReturnTypes = TestIdenticalReturnTypes() + +class TestIdenticalReturnTypesReverse { + constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestIdenticalReturnTypesReverse(): TestIdenticalReturnTypesReverse = TestIdenticalReturnTypesReverse() + + +class TestFunctionWithReifiedTypeParameterVsConstructorA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() +} +inline fun TestFunctionWithReifiedTypeParameterVsConstructorA() {} + +class TestFunctionWithReifiedTypeParameterVsConstructorAReverse { + constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun TestFunctionWithReifiedTypeParameterVsConstructorAReverse() {} + +class TestFunctionWithReifiedTypeParameterVsConstructorB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) +} +inline fun TestFunctionWithReifiedTypeParameterVsConstructorB(arg: T) {} + +class TestFunctionWithReifiedTypeParameterVsConstructorBReverse { + constructor(arg: T) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun TestFunctionWithReifiedTypeParameterVsConstructorBReverse(arg: T) {} + +class TestFunctionWithReifiedTypeParameterVsConstructorC { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) +} +inline fun TestFunctionWithReifiedTypeParameterVsConstructorC(arg: Invariant) {} + +class TestFunctionWithReifiedTypeParameterVsConstructorCReverse { + constructor(arg: Invariant) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun TestFunctionWithReifiedTypeParameterVsConstructorCReverse(arg: Invariant) {} + + +class TestInlineFunctionVsConstructor { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() +} +inline fun TestInlineFunctionVsConstructor() {} + +class TestInlineFunctionVsConstructorReverse { + constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun TestInlineFunctionVsConstructorReverse() {} + + +class TestTailrecFunctionVsConstructor { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() +} +tailrec fun TestTailrecFunctionVsConstructor() {} + +class TestTailrecFunctionVsConstructorReverse { + constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) tailrec fun TestTailrecFunctionVsConstructorReverse() {} + + +class TestFunctionVsPrimaryConstructor @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() +fun TestFunctionVsPrimaryConstructor() {} + +class TestFunctionVsPrimaryConstructorReverse constructor() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestFunctionVsPrimaryConstructorReverse() {} + + +class TestFunctionVsDelegatedPrimaryConstructorCall constructor(placeholder: UserKlass) { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() : this(UserKlass()) +} +fun TestFunctionVsDelegatedPrimaryConstructorCall() {} + +class TestFunctionVsDelegatedPrimaryConstructorCallReverse constructor(placeholder: UserKlass) { + constructor() : this(UserKlass()) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestFunctionVsDelegatedPrimaryConstructorCallReverse() {} + + +open class SuperConstructorSource constructor(placeholder: UserKlass) + +class TestFunctionVsDelegatedSuperConstructorCall: SuperConstructorSource { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() : super(UserKlass()) +} +fun TestFunctionVsDelegatedSuperConstructorCall() {} + +class TestFunctionVsDelegatedSuperConstructorCallReverse: SuperConstructorSource { + constructor() : super(UserKlass()) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestFunctionVsDelegatedSuperConstructorCallReverse() {} + + +class TestIdenticalValueParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass) +} +fun TestIdenticalValueParameters(arg: UserKlass) {} + +class TestIdenticalValueParametersReverse { + constructor(arg: UserKlass) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestIdenticalValueParametersReverse(arg: UserKlass) {} + +class TestDifferentlyNamedValueParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(argA: UserKlass) +} +fun TestDifferentlyNamedValueParameters(argB: UserKlass) {} + +class TestDifferentlyNamedValueParametersReverse { + constructor(argA: UserKlass) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestDifferentlyNamedValueParametersReverse(argB: UserKlass) {} + +class TestTypeAliasedValueParameterTypesA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass) +} +fun TestTypeAliasedValueParameterTypesA(arg: SameUserKlass) {} + +class TestTypeAliasedValueParameterTypesAReverse { + constructor(arg: UserKlass) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeAliasedValueParameterTypesAReverse(arg: SameUserKlass) {} + +class TestTypeAliasedValueParameterTypesB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: SameUserKlass) +} +fun TestTypeAliasedValueParameterTypesB(arg: UserKlass) {} + +class TestTypeAliasedValueParameterTypesBReverse { + constructor(arg: SameUserKlass) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeAliasedValueParameterTypesBReverse(arg: UserKlass) {} + + +class TestMultipleIdenticalValueParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2: UserKlassB) +} +fun TestMultipleIdenticalValueParameters(arg1: UserKlassA, arg2: UserKlassB) {} + +class TestMultipleIdenticalValueParametersReverse { + constructor(arg1: UserKlassA, arg2: UserKlassB) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestMultipleIdenticalValueParametersReverse(arg1: UserKlassA, arg2: UserKlassB) {} + +class TestMultipleDifferentlyNamedValueParametersA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2A: UserKlassB) +} +fun TestMultipleDifferentlyNamedValueParametersA(arg1: UserKlassA, arg2B: UserKlassB) {} + +class TestMultipleDifferentlyNamedValueParametersAReverse { + constructor(arg1: UserKlassA, arg2A: UserKlassB) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestMultipleDifferentlyNamedValueParametersAReverse(arg1: UserKlassA, arg2B: UserKlassB) {} + +class TestMultipleDifferentlyNamedValueParametersB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1A: UserKlassA, arg2A: UserKlassB) +} +fun TestMultipleDifferentlyNamedValueParametersB(arg1B: UserKlassA, arg2B: UserKlassB) {} + +class TestMultipleDifferentlyNamedValueParametersBReverse { + constructor(arg1A: UserKlassA, arg2A: UserKlassB) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestMultipleDifferentlyNamedValueParametersBReverse(arg1B: UserKlassA, arg2B: UserKlassB) {} + +class TestMultipleTypeAliasedValueParameterTypesA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2: SameUserKlassB) +} +fun TestMultipleTypeAliasedValueParameterTypesA(arg1: UserKlassA, arg2: SameUserKlassB) {} + +class TestMultipleTypeAliasedValueParameterTypesAReverse { + constructor(arg1: UserKlassA, arg2: SameUserKlassB) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestMultipleTypeAliasedValueParameterTypesAReverse(arg1: UserKlassA, arg2: SameUserKlassB) {} + +class TestMultipleTypeAliasedValueParameterTypesB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: SameUserKlassA, arg2: SameUserKlassB) +} +fun TestMultipleTypeAliasedValueParameterTypesB(arg1: SameUserKlassA, arg2: SameUserKlassB) {} + +class TestMultipleTypeAliasedValueParameterTypesBReverse { + constructor(arg1: SameUserKlassA, arg2: SameUserKlassB) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestMultipleTypeAliasedValueParameterTypesBReverse(arg1: SameUserKlassA, arg2: SameUserKlassB) {} + + +class TestIdenticalTypeParametersA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() +} +fun TestIdenticalTypeParametersA() {} + +class TestIdenticalTypeParametersAReverse { + constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestIdenticalTypeParametersAReverse() {} + +class TestIdenticalTypeParametersB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) +} +fun TestIdenticalTypeParametersB(arg: T) {} + +class TestIdenticalTypeParametersBReverse { + constructor(arg: T) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestIdenticalTypeParametersBReverse(arg: T) {} + +class TestIdenticalTypeParametersC { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) +} +fun TestIdenticalTypeParametersC(arg: Invariant) {} + +class TestIdenticalTypeParametersCReverse { + constructor(arg: Invariant) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestIdenticalTypeParametersCReverse(arg: Invariant) {} + + +class TestMultipleIdenticalTypeParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() +} +fun TestMultipleIdenticalTypeParameters() {} + +class TestMultipleIdenticalTypeParametersReverse { + constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestMultipleIdenticalTypeParametersReverse() {} + + +class TestTypeParameterWithIdenticalUpperBoundsA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() +} +fun TestTypeParameterWithIdenticalUpperBoundsA() {} + +class TestTypeParameterWithIdenticalUpperBoundsAReverse { + constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithIdenticalUpperBoundsAReverse() {} + +class TestTypeParameterWithIdenticalUpperBoundsB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) +} +fun TestTypeParameterWithIdenticalUpperBoundsB(arg: T) {} + +class TestTypeParameterWithIdenticalUpperBoundsBReverse { + constructor(arg: T) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithIdenticalUpperBoundsBReverse(arg: T) {} + +class TestTypeParameterWithIdenticalUpperBoundsC { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) +} +fun TestTypeParameterWithIdenticalUpperBoundsC(arg: Invariant) {} + +class TestTypeParameterWithIdenticalUpperBoundsCReverse { + constructor(arg: Invariant) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithIdenticalUpperBoundsCReverse(arg: Invariant) {} + + +class TestTypeParameterWithMultipleIdenticalUpperBoundsAA where T: UserInterfaceA, T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() +} +fun TestTypeParameterWithMultipleIdenticalUpperBoundsAA() where T: UserInterfaceA, T: UserInterfaceB {} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsAAReverse where T: UserInterfaceA, T: UserInterfaceB { + constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithMultipleIdenticalUpperBoundsAAReverse() where T: UserInterfaceA, T: UserInterfaceB {} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsAB where T: UserInterfaceA, T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) +} +fun TestTypeParameterWithMultipleIdenticalUpperBoundsAB(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsABReverse where T: UserInterfaceA, T: UserInterfaceB { + constructor(arg: T) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithMultipleIdenticalUpperBoundsABReverse(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsAC where T: UserInterfaceA, T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) +} +fun TestTypeParameterWithMultipleIdenticalUpperBoundsAC(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsACReverse where T: UserInterfaceA, T: UserInterfaceB { + constructor(arg: Invariant) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithMultipleIdenticalUpperBoundsACReverse(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsBA where T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() +} +fun TestTypeParameterWithMultipleIdenticalUpperBoundsBA() where T: UserInterfaceB {} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsBAReverse where T: UserInterfaceB { + constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithMultipleIdenticalUpperBoundsBAReverse() where T: UserInterfaceB {} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsBB where T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) +} +fun TestTypeParameterWithMultipleIdenticalUpperBoundsBB(arg: T) where T: UserInterfaceB {} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsBBReverse where T: UserInterfaceB { + constructor(arg: T) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithMultipleIdenticalUpperBoundsBBReverse(arg: T) where T: UserInterfaceB {} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsBC where T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) +} +fun TestTypeParameterWithMultipleIdenticalUpperBoundsBC(arg: Invariant) where T: UserInterfaceB {} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsBCReverse where T: UserInterfaceB { + constructor(arg: Invariant) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithMultipleIdenticalUpperBoundsBCReverse(arg: Invariant) where T: UserInterfaceB {} + + +class TestIdenticalPrivateVisibility { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private constructor() +} +private fun TestIdenticalPrivateVisibility() {} + +class TestIdenticalPrivateVisibilityReverse { + private constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) private fun TestIdenticalPrivateVisibilityReverse() {} + +class TestIdenticalInternalVisibility { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal constructor() +} +internal fun TestIdenticalInternalVisibility() {} + +class TestIdenticalInternalVisibilityReverse { + internal constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal fun TestIdenticalInternalVisibilityReverse() {} + +class TestDifferencesInPrivateAndPublicVisibilitiesA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private constructor() +} +public fun TestDifferencesInPrivateAndPublicVisibilitiesA() {} + +class TestDifferencesInPrivateAndPublicVisibilitiesAReverse { + private constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) public fun TestDifferencesInPrivateAndPublicVisibilitiesAReverse() {} + +class TestDifferencesInPrivateAndPublicVisibilitiesB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) public constructor() +} +private fun TestDifferencesInPrivateAndPublicVisibilitiesB() {} + +class TestDifferencesInPrivateAndPublicVisibilitiesBReverse { + public constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) private fun TestDifferencesInPrivateAndPublicVisibilitiesBReverse() {} + +class TestDifferencesInInternalAndPublicVisibilitiesA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal constructor() +} +public fun TestDifferencesInInternalAndPublicVisibilitiesA() {} + +class TestDifferencesInInternalAndPublicVisibilitiesAReverse { + internal constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) public fun TestDifferencesInInternalAndPublicVisibilitiesAReverse() {} + +class TestDifferencesInInternalAndPublicVisibilitiesB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) public constructor() +} +internal fun TestDifferencesInInternalAndPublicVisibilitiesB() {} + +class TestDifferencesInInternalAndPublicVisibilitiesBReverse { + public constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal fun TestDifferencesInInternalAndPublicVisibilitiesBReverse() {} + +class TestDifferencesInPrivateAndInternalVisibilitiesA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private constructor() +} +internal fun TestDifferencesInPrivateAndInternalVisibilitiesA() {} + +class TestDifferencesInPrivateAndInternalVisibilitiesAReverse { + private constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal fun TestDifferencesInPrivateAndInternalVisibilitiesAReverse() {} + +class TestDifferencesInPrivateAndInternalVisibilitiesB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal constructor() +} +private fun TestDifferencesInPrivateAndInternalVisibilitiesB() {} + +class TestDifferencesInPrivateAndInternalVisibilitiesBReverse { + internal constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) private fun TestDifferencesInPrivateAndInternalVisibilitiesBReverse() {} + + +open class Invariant + + +class UserKlass +class UserKlassA +class UserKlassB +typealias SameUserKlass = UserKlass +typealias SameUserKlassA = UserKlassA +typealias SameUserKlassB = UserKlassB + + +interface UserInterface +interface UserInterfaceA +interface UserInterfaceB diff --git a/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/FunctionsAndConstructorsOnTopLevel.fir.kt b/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/FunctionsAndConstructorsOnTopLevel.fir.kt new file mode 100644 index 00000000000..4b9c744449e --- /dev/null +++ b/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/FunctionsAndConstructorsOnTopLevel.fir.kt @@ -0,0 +1,430 @@ +// DIAGNOSTICS: -NOTHING_TO_INLINE, -NO_TAIL_CALLS_FOUND, -MISPLACED_TYPE_PARAMETER_CONSTRAINTS + + +class TestBasic { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() +} +fun TestBasic() {} + +class TestBasicReverse { + constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestBasicReverse() {} + + +class TestIdenticalReturnTypes { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() +} +fun TestIdenticalReturnTypes(): TestIdenticalReturnTypes = TestIdenticalReturnTypes() + +class TestIdenticalReturnTypesReverse { + constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestIdenticalReturnTypesReverse(): TestIdenticalReturnTypesReverse = TestIdenticalReturnTypesReverse() + + +class TestFunctionWithReifiedTypeParameterVsConstructorA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() +} +inline fun TestFunctionWithReifiedTypeParameterVsConstructorA() {} + +class TestFunctionWithReifiedTypeParameterVsConstructorAReverse { + constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun TestFunctionWithReifiedTypeParameterVsConstructorAReverse() {} + +class TestFunctionWithReifiedTypeParameterVsConstructorB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) +} +inline fun TestFunctionWithReifiedTypeParameterVsConstructorB(arg: T) {} + +class TestFunctionWithReifiedTypeParameterVsConstructorBReverse { + constructor(arg: T) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun TestFunctionWithReifiedTypeParameterVsConstructorBReverse(arg: T) {} + +class TestFunctionWithReifiedTypeParameterVsConstructorC { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) +} +inline fun TestFunctionWithReifiedTypeParameterVsConstructorC(arg: Invariant) {} + +class TestFunctionWithReifiedTypeParameterVsConstructorCReverse { + constructor(arg: Invariant) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun TestFunctionWithReifiedTypeParameterVsConstructorCReverse(arg: Invariant) {} + + +class TestInlineFunctionVsConstructor { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() +} +inline fun TestInlineFunctionVsConstructor() {} + +class TestInlineFunctionVsConstructorReverse { + constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun TestInlineFunctionVsConstructorReverse() {} + + +class TestTailrecFunctionVsConstructor { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() +} +tailrec fun TestTailrecFunctionVsConstructor() {} + +class TestTailrecFunctionVsConstructorReverse { + constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) tailrec fun TestTailrecFunctionVsConstructorReverse() {} + + +class TestFunctionVsPrimaryConstructor @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() +fun TestFunctionVsPrimaryConstructor() {} + +class TestFunctionVsPrimaryConstructorReverse constructor() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestFunctionVsPrimaryConstructorReverse() {} + + +class TestFunctionVsDelegatedPrimaryConstructorCall constructor(placeholder: UserKlass) { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() : this(UserKlass()) +} +fun TestFunctionVsDelegatedPrimaryConstructorCall() {} + +class TestFunctionVsDelegatedPrimaryConstructorCallReverse constructor(placeholder: UserKlass) { + constructor() : this(UserKlass()) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestFunctionVsDelegatedPrimaryConstructorCallReverse() {} + + +open class SuperConstructorSource constructor(placeholder: UserKlass) + +class TestFunctionVsDelegatedSuperConstructorCall: SuperConstructorSource { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() : super(UserKlass()) +} +fun TestFunctionVsDelegatedSuperConstructorCall() {} + +class TestFunctionVsDelegatedSuperConstructorCallReverse: SuperConstructorSource { + constructor() : super(UserKlass()) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestFunctionVsDelegatedSuperConstructorCallReverse() {} + + +class TestIdenticalValueParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass) +} +fun TestIdenticalValueParameters(arg: UserKlass) {} + +class TestIdenticalValueParametersReverse { + constructor(arg: UserKlass) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestIdenticalValueParametersReverse(arg: UserKlass) {} + +class TestDifferentlyNamedValueParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(argA: UserKlass) +} +fun TestDifferentlyNamedValueParameters(argB: UserKlass) {} + +class TestDifferentlyNamedValueParametersReverse { + constructor(argA: UserKlass) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestDifferentlyNamedValueParametersReverse(argB: UserKlass) {} + +class TestTypeAliasedValueParameterTypesA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass) +} +fun TestTypeAliasedValueParameterTypesA(arg: SameUserKlass) {} + +class TestTypeAliasedValueParameterTypesAReverse { + constructor(arg: UserKlass) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeAliasedValueParameterTypesAReverse(arg: SameUserKlass) {} + +class TestTypeAliasedValueParameterTypesB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: SameUserKlass) +} +fun TestTypeAliasedValueParameterTypesB(arg: UserKlass) {} + +class TestTypeAliasedValueParameterTypesBReverse { + constructor(arg: SameUserKlass) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeAliasedValueParameterTypesBReverse(arg: UserKlass) {} + + +class TestMultipleIdenticalValueParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2: UserKlassB) +} +fun TestMultipleIdenticalValueParameters(arg1: UserKlassA, arg2: UserKlassB) {} + +class TestMultipleIdenticalValueParametersReverse { + constructor(arg1: UserKlassA, arg2: UserKlassB) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestMultipleIdenticalValueParametersReverse(arg1: UserKlassA, arg2: UserKlassB) {} + +class TestMultipleDifferentlyNamedValueParametersA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2A: UserKlassB) +} +fun TestMultipleDifferentlyNamedValueParametersA(arg1: UserKlassA, arg2B: UserKlassB) {} + +class TestMultipleDifferentlyNamedValueParametersAReverse { + constructor(arg1: UserKlassA, arg2A: UserKlassB) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestMultipleDifferentlyNamedValueParametersAReverse(arg1: UserKlassA, arg2B: UserKlassB) {} + +class TestMultipleDifferentlyNamedValueParametersB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1A: UserKlassA, arg2A: UserKlassB) +} +fun TestMultipleDifferentlyNamedValueParametersB(arg1B: UserKlassA, arg2B: UserKlassB) {} + +class TestMultipleDifferentlyNamedValueParametersBReverse { + constructor(arg1A: UserKlassA, arg2A: UserKlassB) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestMultipleDifferentlyNamedValueParametersBReverse(arg1B: UserKlassA, arg2B: UserKlassB) {} + +class TestMultipleTypeAliasedValueParameterTypesA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2: SameUserKlassB) +} +fun TestMultipleTypeAliasedValueParameterTypesA(arg1: UserKlassA, arg2: SameUserKlassB) {} + +class TestMultipleTypeAliasedValueParameterTypesAReverse { + constructor(arg1: UserKlassA, arg2: SameUserKlassB) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestMultipleTypeAliasedValueParameterTypesAReverse(arg1: UserKlassA, arg2: SameUserKlassB) {} + +class TestMultipleTypeAliasedValueParameterTypesB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: SameUserKlassA, arg2: SameUserKlassB) +} +fun TestMultipleTypeAliasedValueParameterTypesB(arg1: SameUserKlassA, arg2: SameUserKlassB) {} + +class TestMultipleTypeAliasedValueParameterTypesBReverse { + constructor(arg1: SameUserKlassA, arg2: SameUserKlassB) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestMultipleTypeAliasedValueParameterTypesBReverse(arg1: SameUserKlassA, arg2: SameUserKlassB) {} + + +class TestIdenticalTypeParametersA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() +} +fun TestIdenticalTypeParametersA() {} + +class TestIdenticalTypeParametersAReverse { + constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestIdenticalTypeParametersAReverse() {} + +class TestIdenticalTypeParametersB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) +} +fun TestIdenticalTypeParametersB(arg: T) {} + +class TestIdenticalTypeParametersBReverse { + constructor(arg: T) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestIdenticalTypeParametersBReverse(arg: T) {} + +class TestIdenticalTypeParametersC { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) +} +fun TestIdenticalTypeParametersC(arg: Invariant) {} + +class TestIdenticalTypeParametersCReverse { + constructor(arg: Invariant) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestIdenticalTypeParametersCReverse(arg: Invariant) {} + + +class TestMultipleIdenticalTypeParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() +} +fun TestMultipleIdenticalTypeParameters() {} + +class TestMultipleIdenticalTypeParametersReverse { + constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestMultipleIdenticalTypeParametersReverse() {} + + +class TestTypeParameterWithIdenticalUpperBoundsA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() +} +fun TestTypeParameterWithIdenticalUpperBoundsA() {} + +class TestTypeParameterWithIdenticalUpperBoundsAReverse { + constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithIdenticalUpperBoundsAReverse() {} + +class TestTypeParameterWithIdenticalUpperBoundsB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) +} +fun TestTypeParameterWithIdenticalUpperBoundsB(arg: T) {} + +class TestTypeParameterWithIdenticalUpperBoundsBReverse { + constructor(arg: T) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithIdenticalUpperBoundsBReverse(arg: T) {} + +class TestTypeParameterWithIdenticalUpperBoundsC { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) +} +fun TestTypeParameterWithIdenticalUpperBoundsC(arg: Invariant) {} + +class TestTypeParameterWithIdenticalUpperBoundsCReverse { + constructor(arg: Invariant) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithIdenticalUpperBoundsCReverse(arg: Invariant) {} + + +class TestTypeParameterWithMultipleIdenticalUpperBoundsAA where T: UserInterfaceA, T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() +} +fun TestTypeParameterWithMultipleIdenticalUpperBoundsAA() where T: UserInterfaceA, T: UserInterfaceB {} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsAAReverse where T: UserInterfaceA, T: UserInterfaceB { + constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithMultipleIdenticalUpperBoundsAAReverse() where T: UserInterfaceA, T: UserInterfaceB {} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsAB where T: UserInterfaceA, T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) +} +fun TestTypeParameterWithMultipleIdenticalUpperBoundsAB(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsABReverse where T: UserInterfaceA, T: UserInterfaceB { + constructor(arg: T) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithMultipleIdenticalUpperBoundsABReverse(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsAC where T: UserInterfaceA, T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) +} +fun TestTypeParameterWithMultipleIdenticalUpperBoundsAC(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsACReverse where T: UserInterfaceA, T: UserInterfaceB { + constructor(arg: Invariant) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithMultipleIdenticalUpperBoundsACReverse(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsBA where T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() +} +fun TestTypeParameterWithMultipleIdenticalUpperBoundsBA() where T: UserInterfaceB {} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsBAReverse where T: UserInterfaceB { + constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithMultipleIdenticalUpperBoundsBAReverse() where T: UserInterfaceB {} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsBB where T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) +} +fun TestTypeParameterWithMultipleIdenticalUpperBoundsBB(arg: T) where T: UserInterfaceB {} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsBBReverse where T: UserInterfaceB { + constructor(arg: T) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithMultipleIdenticalUpperBoundsBBReverse(arg: T) where T: UserInterfaceB {} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsBC where T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) +} +fun TestTypeParameterWithMultipleIdenticalUpperBoundsBC(arg: Invariant) where T: UserInterfaceB {} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsBCReverse where T: UserInterfaceB { + constructor(arg: Invariant) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithMultipleIdenticalUpperBoundsBCReverse(arg: Invariant) where T: UserInterfaceB {} + + +class TestIdenticalPrivateVisibility { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private constructor() +} +private fun TestIdenticalPrivateVisibility() {} + +class TestIdenticalPrivateVisibilityReverse { + private constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) private fun TestIdenticalPrivateVisibilityReverse() {} + +class TestIdenticalInternalVisibility { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal constructor() +} +internal fun TestIdenticalInternalVisibility() {} + +class TestIdenticalInternalVisibilityReverse { + internal constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal fun TestIdenticalInternalVisibilityReverse() {} + +class TestDifferencesInPrivateAndPublicVisibilitiesA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private constructor() +} +public fun TestDifferencesInPrivateAndPublicVisibilitiesA() {} + +class TestDifferencesInPrivateAndPublicVisibilitiesAReverse { + private constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) public fun TestDifferencesInPrivateAndPublicVisibilitiesAReverse() {} + +class TestDifferencesInPrivateAndPublicVisibilitiesB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) public constructor() +} +private fun TestDifferencesInPrivateAndPublicVisibilitiesB() {} + +class TestDifferencesInPrivateAndPublicVisibilitiesBReverse { + public constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) private fun TestDifferencesInPrivateAndPublicVisibilitiesBReverse() {} + +class TestDifferencesInInternalAndPublicVisibilitiesA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal constructor() +} +public fun TestDifferencesInInternalAndPublicVisibilitiesA() {} + +class TestDifferencesInInternalAndPublicVisibilitiesAReverse { + internal constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) public fun TestDifferencesInInternalAndPublicVisibilitiesAReverse() {} + +class TestDifferencesInInternalAndPublicVisibilitiesB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) public constructor() +} +internal fun TestDifferencesInInternalAndPublicVisibilitiesB() {} + +class TestDifferencesInInternalAndPublicVisibilitiesBReverse { + public constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal fun TestDifferencesInInternalAndPublicVisibilitiesBReverse() {} + +class TestDifferencesInPrivateAndInternalVisibilitiesA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private constructor() +} +internal fun TestDifferencesInPrivateAndInternalVisibilitiesA() {} + +class TestDifferencesInPrivateAndInternalVisibilitiesAReverse { + private constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal fun TestDifferencesInPrivateAndInternalVisibilitiesAReverse() {} + +class TestDifferencesInPrivateAndInternalVisibilitiesB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal constructor() +} +private fun TestDifferencesInPrivateAndInternalVisibilitiesB() {} + +class TestDifferencesInPrivateAndInternalVisibilitiesBReverse { + internal constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) private fun TestDifferencesInPrivateAndInternalVisibilitiesBReverse() {} + + +open class Invariant + + +class UserKlass +class UserKlassA +class UserKlassB +typealias SameUserKlass = UserKlass +typealias SameUserKlassA = UserKlassA +typealias SameUserKlassB = UserKlassB + + +interface UserInterface +interface UserInterfaceA +interface UserInterfaceB diff --git a/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/FunctionsAndConstructorsOnTopLevel.kt b/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/FunctionsAndConstructorsOnTopLevel.kt new file mode 100644 index 00000000000..7bfbaf567f9 --- /dev/null +++ b/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/FunctionsAndConstructorsOnTopLevel.kt @@ -0,0 +1,430 @@ +// DIAGNOSTICS: -NOTHING_TO_INLINE, -NO_TAIL_CALLS_FOUND, -MISPLACED_TYPE_PARAMETER_CONSTRAINTS + + +class TestBasic { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() +} +fun TestBasic() {} + +class TestBasicReverse { + constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestBasicReverse() {} + + +class TestIdenticalReturnTypes { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() +} +fun TestIdenticalReturnTypes(): TestIdenticalReturnTypes = TestIdenticalReturnTypes() + +class TestIdenticalReturnTypesReverse { + constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestIdenticalReturnTypesReverse(): TestIdenticalReturnTypesReverse = TestIdenticalReturnTypesReverse() + + +class TestFunctionWithReifiedTypeParameterVsConstructorA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() +} +inline fun TestFunctionWithReifiedTypeParameterVsConstructorA() {} + +class TestFunctionWithReifiedTypeParameterVsConstructorAReverse { + constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun TestFunctionWithReifiedTypeParameterVsConstructorAReverse() {} + +class TestFunctionWithReifiedTypeParameterVsConstructorB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) +} +inline fun TestFunctionWithReifiedTypeParameterVsConstructorB(arg: T) {} + +class TestFunctionWithReifiedTypeParameterVsConstructorBReverse { + constructor(arg: T) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun TestFunctionWithReifiedTypeParameterVsConstructorBReverse(arg: T) {} + +class TestFunctionWithReifiedTypeParameterVsConstructorC { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) +} +inline fun TestFunctionWithReifiedTypeParameterVsConstructorC(arg: Invariant) {} + +class TestFunctionWithReifiedTypeParameterVsConstructorCReverse { + constructor(arg: Invariant) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun TestFunctionWithReifiedTypeParameterVsConstructorCReverse(arg: Invariant) {} + + +class TestInlineFunctionVsConstructor { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() +} +inline fun TestInlineFunctionVsConstructor() {} + +class TestInlineFunctionVsConstructorReverse { + constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun TestInlineFunctionVsConstructorReverse() {} + + +class TestTailrecFunctionVsConstructor { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() +} +tailrec fun TestTailrecFunctionVsConstructor() {} + +class TestTailrecFunctionVsConstructorReverse { + constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) tailrec fun TestTailrecFunctionVsConstructorReverse() {} + + +class TestFunctionVsPrimaryConstructor @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() +fun TestFunctionVsPrimaryConstructor() {} + +class TestFunctionVsPrimaryConstructorReverse constructor() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestFunctionVsPrimaryConstructorReverse() {} + + +class TestFunctionVsDelegatedPrimaryConstructorCall constructor(placeholder: UserKlass) { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() : this(UserKlass()) +} +fun TestFunctionVsDelegatedPrimaryConstructorCall() {} + +class TestFunctionVsDelegatedPrimaryConstructorCallReverse constructor(placeholder: UserKlass) { + constructor() : this(UserKlass()) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestFunctionVsDelegatedPrimaryConstructorCallReverse() {} + + +open class SuperConstructorSource constructor(placeholder: UserKlass) + +class TestFunctionVsDelegatedSuperConstructorCall: SuperConstructorSource { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() : super(UserKlass()) +} +fun TestFunctionVsDelegatedSuperConstructorCall() {} + +class TestFunctionVsDelegatedSuperConstructorCallReverse: SuperConstructorSource { + constructor() : super(UserKlass()) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestFunctionVsDelegatedSuperConstructorCallReverse() {} + + +class TestIdenticalValueParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass) +} +fun TestIdenticalValueParameters(arg: UserKlass) {} + +class TestIdenticalValueParametersReverse { + constructor(arg: UserKlass) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestIdenticalValueParametersReverse(arg: UserKlass) {} + +class TestDifferentlyNamedValueParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(argA: UserKlass) +} +fun TestDifferentlyNamedValueParameters(argB: UserKlass) {} + +class TestDifferentlyNamedValueParametersReverse { + constructor(argA: UserKlass) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestDifferentlyNamedValueParametersReverse(argB: UserKlass) {} + +class TestTypeAliasedValueParameterTypesA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: UserKlass) +} +fun TestTypeAliasedValueParameterTypesA(arg: SameUserKlass) {} + +class TestTypeAliasedValueParameterTypesAReverse { + constructor(arg: UserKlass) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeAliasedValueParameterTypesAReverse(arg: SameUserKlass) {} + +class TestTypeAliasedValueParameterTypesB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: SameUserKlass) +} +fun TestTypeAliasedValueParameterTypesB(arg: UserKlass) {} + +class TestTypeAliasedValueParameterTypesBReverse { + constructor(arg: SameUserKlass) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeAliasedValueParameterTypesBReverse(arg: UserKlass) {} + + +class TestMultipleIdenticalValueParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2: UserKlassB) +} +fun TestMultipleIdenticalValueParameters(arg1: UserKlassA, arg2: UserKlassB) {} + +class TestMultipleIdenticalValueParametersReverse { + constructor(arg1: UserKlassA, arg2: UserKlassB) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestMultipleIdenticalValueParametersReverse(arg1: UserKlassA, arg2: UserKlassB) {} + +class TestMultipleDifferentlyNamedValueParametersA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2A: UserKlassB) +} +fun TestMultipleDifferentlyNamedValueParametersA(arg1: UserKlassA, arg2B: UserKlassB) {} + +class TestMultipleDifferentlyNamedValueParametersAReverse { + constructor(arg1: UserKlassA, arg2A: UserKlassB) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestMultipleDifferentlyNamedValueParametersAReverse(arg1: UserKlassA, arg2B: UserKlassB) {} + +class TestMultipleDifferentlyNamedValueParametersB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1A: UserKlassA, arg2A: UserKlassB) +} +fun TestMultipleDifferentlyNamedValueParametersB(arg1B: UserKlassA, arg2B: UserKlassB) {} + +class TestMultipleDifferentlyNamedValueParametersBReverse { + constructor(arg1A: UserKlassA, arg2A: UserKlassB) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestMultipleDifferentlyNamedValueParametersBReverse(arg1B: UserKlassA, arg2B: UserKlassB) {} + +class TestMultipleTypeAliasedValueParameterTypesA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: UserKlassA, arg2: SameUserKlassB) +} +fun TestMultipleTypeAliasedValueParameterTypesA(arg1: UserKlassA, arg2: SameUserKlassB) {} + +class TestMultipleTypeAliasedValueParameterTypesAReverse { + constructor(arg1: UserKlassA, arg2: SameUserKlassB) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestMultipleTypeAliasedValueParameterTypesAReverse(arg1: UserKlassA, arg2: SameUserKlassB) {} + +class TestMultipleTypeAliasedValueParameterTypesB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg1: SameUserKlassA, arg2: SameUserKlassB) +} +fun TestMultipleTypeAliasedValueParameterTypesB(arg1: SameUserKlassA, arg2: SameUserKlassB) {} + +class TestMultipleTypeAliasedValueParameterTypesBReverse { + constructor(arg1: SameUserKlassA, arg2: SameUserKlassB) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestMultipleTypeAliasedValueParameterTypesBReverse(arg1: SameUserKlassA, arg2: SameUserKlassB) {} + + +class TestIdenticalTypeParametersA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() +} +fun TestIdenticalTypeParametersA() {} + +class TestIdenticalTypeParametersAReverse { + constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestIdenticalTypeParametersAReverse() {} + +class TestIdenticalTypeParametersB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) +} +fun TestIdenticalTypeParametersB(arg: T) {} + +class TestIdenticalTypeParametersBReverse { + constructor(arg: T) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestIdenticalTypeParametersBReverse(arg: T) {} + +class TestIdenticalTypeParametersC { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) +} +fun TestIdenticalTypeParametersC(arg: Invariant) {} + +class TestIdenticalTypeParametersCReverse { + constructor(arg: Invariant) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestIdenticalTypeParametersCReverse(arg: Invariant) {} + + +class TestMultipleIdenticalTypeParameters { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() +} +fun TestMultipleIdenticalTypeParameters() {} + +class TestMultipleIdenticalTypeParametersReverse { + constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestMultipleIdenticalTypeParametersReverse() {} + + +class TestTypeParameterWithIdenticalUpperBoundsA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() +} +fun TestTypeParameterWithIdenticalUpperBoundsA() {} + +class TestTypeParameterWithIdenticalUpperBoundsAReverse { + constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithIdenticalUpperBoundsAReverse() {} + +class TestTypeParameterWithIdenticalUpperBoundsB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) +} +fun TestTypeParameterWithIdenticalUpperBoundsB(arg: T) {} + +class TestTypeParameterWithIdenticalUpperBoundsBReverse { + constructor(arg: T) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithIdenticalUpperBoundsBReverse(arg: T) {} + +class TestTypeParameterWithIdenticalUpperBoundsC { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) +} +fun TestTypeParameterWithIdenticalUpperBoundsC(arg: Invariant) {} + +class TestTypeParameterWithIdenticalUpperBoundsCReverse { + constructor(arg: Invariant) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithIdenticalUpperBoundsCReverse(arg: Invariant) {} + + +class TestTypeParameterWithMultipleIdenticalUpperBoundsAA where T: UserInterfaceA, T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() +} +fun TestTypeParameterWithMultipleIdenticalUpperBoundsAA() where T: UserInterfaceA, T: UserInterfaceB {} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsAAReverse where T: UserInterfaceA, T: UserInterfaceB { + constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithMultipleIdenticalUpperBoundsAAReverse() where T: UserInterfaceA, T: UserInterfaceB {} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsAB where T: UserInterfaceA, T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) +} +fun TestTypeParameterWithMultipleIdenticalUpperBoundsAB(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsABReverse where T: UserInterfaceA, T: UserInterfaceB { + constructor(arg: T) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithMultipleIdenticalUpperBoundsABReverse(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsAC where T: UserInterfaceA, T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) +} +fun TestTypeParameterWithMultipleIdenticalUpperBoundsAC(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsACReverse where T: UserInterfaceA, T: UserInterfaceB { + constructor(arg: Invariant) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithMultipleIdenticalUpperBoundsACReverse(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsBA where T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor() +} +fun TestTypeParameterWithMultipleIdenticalUpperBoundsBA() where T: UserInterfaceB {} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsBAReverse where T: UserInterfaceB { + constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithMultipleIdenticalUpperBoundsBAReverse() where T: UserInterfaceB {} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsBB where T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: T) +} +fun TestTypeParameterWithMultipleIdenticalUpperBoundsBB(arg: T) where T: UserInterfaceB {} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsBBReverse where T: UserInterfaceB { + constructor(arg: T) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithMultipleIdenticalUpperBoundsBBReverse(arg: T) where T: UserInterfaceB {} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsBC where T: UserInterfaceB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) constructor(arg: Invariant) +} +fun TestTypeParameterWithMultipleIdenticalUpperBoundsBC(arg: Invariant) where T: UserInterfaceB {} + +class TestTypeParameterWithMultipleIdenticalUpperBoundsBCReverse where T: UserInterfaceB { + constructor(arg: Invariant) +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun TestTypeParameterWithMultipleIdenticalUpperBoundsBCReverse(arg: Invariant) where T: UserInterfaceB {} + + +class TestIdenticalPrivateVisibility { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private constructor() +} +private fun TestIdenticalPrivateVisibility() {} + +class TestIdenticalPrivateVisibilityReverse { + private constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) private fun TestIdenticalPrivateVisibilityReverse() {} + +class TestIdenticalInternalVisibility { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal constructor() +} +internal fun TestIdenticalInternalVisibility() {} + +class TestIdenticalInternalVisibilityReverse { + internal constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal fun TestIdenticalInternalVisibilityReverse() {} + +class TestDifferencesInPrivateAndPublicVisibilitiesA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private constructor() +} +public fun TestDifferencesInPrivateAndPublicVisibilitiesA() {} + +class TestDifferencesInPrivateAndPublicVisibilitiesAReverse { + private constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) public fun TestDifferencesInPrivateAndPublicVisibilitiesAReverse() {} + +class TestDifferencesInPrivateAndPublicVisibilitiesB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) public constructor() +} +private fun TestDifferencesInPrivateAndPublicVisibilitiesB() {} + +class TestDifferencesInPrivateAndPublicVisibilitiesBReverse { + public constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) private fun TestDifferencesInPrivateAndPublicVisibilitiesBReverse() {} + +class TestDifferencesInInternalAndPublicVisibilitiesA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal constructor() +} +public fun TestDifferencesInInternalAndPublicVisibilitiesA() {} + +class TestDifferencesInInternalAndPublicVisibilitiesAReverse { + internal constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) public fun TestDifferencesInInternalAndPublicVisibilitiesAReverse() {} + +class TestDifferencesInInternalAndPublicVisibilitiesB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) public constructor() +} +internal fun TestDifferencesInInternalAndPublicVisibilitiesB() {} + +class TestDifferencesInInternalAndPublicVisibilitiesBReverse { + public constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal fun TestDifferencesInInternalAndPublicVisibilitiesBReverse() {} + +class TestDifferencesInPrivateAndInternalVisibilitiesA { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private constructor() +} +internal fun TestDifferencesInPrivateAndInternalVisibilitiesA() {} + +class TestDifferencesInPrivateAndInternalVisibilitiesAReverse { + private constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal fun TestDifferencesInPrivateAndInternalVisibilitiesAReverse() {} + +class TestDifferencesInPrivateAndInternalVisibilitiesB { + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal constructor() +} +private fun TestDifferencesInPrivateAndInternalVisibilitiesB() {} + +class TestDifferencesInPrivateAndInternalVisibilitiesBReverse { + internal constructor() +} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) private fun TestDifferencesInPrivateAndInternalVisibilitiesBReverse() {} + + +open class Invariant + + +class UserKlass +class UserKlassA +class UserKlassB +typealias SameUserKlass = UserKlass +typealias SameUserKlassA = UserKlassA +typealias SameUserKlassB = UserKlassB + + +interface UserInterface +interface UserInterfaceA +interface UserInterfaceB diff --git a/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/FunctionsInMemberScope.fir.kt b/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/FunctionsInMemberScope.fir.kt new file mode 100644 index 00000000000..2278f1cef72 --- /dev/null +++ b/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/FunctionsInMemberScope.fir.kt @@ -0,0 +1,500 @@ +// DIAGNOSTICS: -MISPLACED_TYPE_PARAMETER_CONSTRAINTS, -NOTHING_TO_INLINE, -NO_TAIL_CALLS_FOUND + + +class MemberScope { + + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testBasic() {} + fun testBasic() {} + + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testIdenticalReturnTypes(): UserKlass = UserKlass() + fun testIdenticalReturnTypes(): UserKlass = UserKlass() + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInReturnTypePresence(): Unit {} + fun testDifferencesInReturnTypePresence() {} + + fun testDifferencesInReturnTypePresenceReverse(): Unit {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInReturnTypePresenceReverse() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferentReturnTypes(): UserKlassA = UserKlassA() + fun testDifferentReturnTypes(): UserKlassB = UserKlassB() + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesA(): Invariant = Invariant() + fun testVarianceDifferentReturnTypesA(): Invariant = Invariant() + + fun testVarianceDifferentReturnTypesAReverse(): Invariant = Invariant() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesAReverse(): Invariant = Invariant() + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesB(): Invariant = Invariant() + fun testVarianceDifferentReturnTypesB(): Invariant = Invariant() + + fun testVarianceDifferentReturnTypesBReverse(): Invariant = Invariant() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesBReverse(): Invariant = Invariant() + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesC(): Invariant = Invariant() + fun testVarianceDifferentReturnTypesC(): Invariant<*> = Invariant() + + fun testVarianceDifferentReturnTypesCReverse(): Invariant = Invariant() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesCReverse(): Invariant<*> = Invariant() + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesD(): Invariant = Invariant() + fun testVarianceDifferentReturnTypesD(): Invariant<*> = Invariant() + + fun testVarianceDifferentReturnTypesDReverse(): Invariant = Invariant() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesDReverse(): Invariant<*> = Invariant() + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesE(): Invariant = Invariant() + fun testVarianceDifferentReturnTypesE(): Invariant<*> = Invariant() + + fun testVarianceDifferentReturnTypesEReverse(): Invariant = Invariant() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesEReverse(): Invariant<*> = Invariant() + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesF(): Invariant = Invariant() + fun testVarianceDifferentReturnTypesF(): Invariant = Invariant() + + fun testVarianceDifferentReturnTypesFReverse(): Invariant = Invariant() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesFReverse(): Invariant = Invariant() + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeAliasedReturnTypes(): UserKlass = UserKlass() + fun testTypeAliasedReturnTypes(): SameUserKlass = UserKlass() + + fun testTypeAliasedReturnTypesReverse(): UserKlass = UserKlass() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeAliasedReturnTypesReverse(): SameUserKlass = UserKlass() + + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun UserKlass.testIdenticalExtensionReceivers() {} + fun UserKlass.testIdenticalExtensionReceivers() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun UserKlass.testTypeAliasedExtensionReceivers() {} + fun SameUserKlass.testTypeAliasedExtensionReceivers() {} + + fun UserKlass.testTypeAliasedExtensionReceiversReverse() {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun SameUserKlass.testTypeAliasedExtensionReceiversReverse() {} + + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testIdenticalValueParameters(arg: UserKlass) {} + fun testIdenticalValueParameters(arg: UserKlass) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferentlyNamedValueParameters(argA: UserKlass) {} + fun testDifferentlyNamedValueParameters(argB: UserKlass) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeAliasedValueParameterTypes(arg: UserKlass) {} + fun testTypeAliasedValueParameterTypes(arg: SameUserKlass) {} + + fun testTypeAliasedValueParameterTypesReverse(arg: UserKlass) {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeAliasedValueParameterTypesReverse(arg: SameUserKlass) {} + + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleIdenticalValueParameters(arg1: UserKlassA, arg2: UserKlassB) {} + fun testMultipleIdenticalValueParameters(arg1: UserKlassA, arg2: UserKlassB) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleDifferentlyNamedValueParametersA(arg1: UserKlassA, arg2A: UserKlassB) {} + fun testMultipleDifferentlyNamedValueParametersA(arg1: UserKlassA, arg2B: UserKlassB) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleDifferentlyNamedValueParametersB(arg1A: UserKlassA, arg2A: UserKlassB) {} + fun testMultipleDifferentlyNamedValueParametersB(arg1B: UserKlassA, arg2B: UserKlassB) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleTypeAliasedValueParameterTypesA(arg1: UserKlassA, arg2: UserKlassB) {} + fun testMultipleTypeAliasedValueParameterTypesA(arg1: UserKlassA, arg2: SameUserKlassB) {} + + fun testMultipleTypeAliasedValueParameterTypesAReverse(arg1: UserKlassA, arg2: UserKlassB) {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleTypeAliasedValueParameterTypesAReverse(arg1: UserKlassA, arg2: SameUserKlassB) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleTypeAliasedValueParameterTypesB(arg1: UserKlassA, arg2: UserKlassB) {} + fun testMultipleTypeAliasedValueParameterTypesB(arg1: SameUserKlassA, arg2: SameUserKlassB) {} + + fun testMultipleTypeAliasedValueParameterTypesBReverse(arg1: UserKlassA, arg2: UserKlassB) {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleTypeAliasedValueParameterTypesBReverse(arg1: SameUserKlassA, arg2: SameUserKlassB) {} + + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testValueParameterWithIdenticalDefaultArguments(arg: UserKlass = defaultArgument) {} + fun testValueParameterWithIdenticalDefaultArguments(arg: UserKlass = defaultArgument) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInValueParameterDefaultArgumentsPresence(arg: UserKlass = defaultArgument) {} + fun testDifferencesInValueParameterDefaultArgumentsPresence(arg: UserKlass) {} + + fun testDifferencesInValueParameterDefaultArgumentsPresenceReverse(arg: UserKlass = defaultArgument) {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInValueParameterDefaultArgumentsPresenceReverse(arg: UserKlass) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testValueParameterWithDifferentDefaultArguments(arg: UserKlass = defaultArgumentA) {} + fun testValueParameterWithDifferentDefaultArguments(arg: UserKlass = defaultArgumentB) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testValueParameterWithAliasedDefaultArguments(arg: UserKlass = defaultArgument) {} + fun testValueParameterWithAliasedDefaultArguments(arg: UserKlass = sameDefaultArgument) {} + + fun testValueParameterWithAliasedDefaultArgumentsReverse(arg: UserKlass = defaultArgument) {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testValueParameterWithAliasedDefaultArgumentsReverse(arg: UserKlass = sameDefaultArgument) {} + + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testIdenticalTypeParametersA() {} + fun testIdenticalTypeParametersA() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testIdenticalTypeParametersB(arg: T) {} + fun testIdenticalTypeParametersB(arg: T) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testIdenticalTypeParametersC(arg: Invariant) {} + fun testIdenticalTypeParametersC(arg: Invariant) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferentlyNamedTypeParametersA() {} + fun testDifferentlyNamedTypeParametersA() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferentlyNamedTypeParametersB(arg: TA) {} + fun testDifferentlyNamedTypeParametersB(arg: TB) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferentlyNamedTypeParametersC(arg: Invariant) {} + fun testDifferentlyNamedTypeParametersC(arg: Invariant) {} + + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleIdenticalTypeParameters() {} + fun testMultipleIdenticalTypeParameters() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleDifferentlyNamedTypeParametersA() {} + fun testMultipleDifferentlyNamedTypeParametersA() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleDifferentlyNamedTypeParametersB() {} + fun testMultipleDifferentlyNamedTypeParametersB() {} + + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithIdenticalUpperBoundsA() {} + fun testTypeParameterWithIdenticalUpperBoundsA() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithIdenticalUpperBoundsB(arg: T) {} + fun testTypeParameterWithIdenticalUpperBoundsB(arg: T) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithIdenticalUpperBoundsC(arg: Invariant) {} + fun testTypeParameterWithIdenticalUpperBoundsC(arg: Invariant) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInTypeParameterUpperBoundsPresence() {} + fun testDifferencesInTypeParameterUpperBoundsPresence() {} + + fun testDifferencesInTypeParameterUpperBoundsPresenceReverse() {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInTypeParameterUpperBoundsPresenceReverse() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithDifferentUpperBounds() {} + fun testTypeParameterWithDifferentUpperBounds() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsA() {} + fun > testTypeParameterWithVarianceDifferentUpperBoundsA() {} + + fun > testTypeParameterWithVarianceDifferentUpperBoundsAReverse() {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsAReverse() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsB() {} + fun > testTypeParameterWithVarianceDifferentUpperBoundsB() {} + + fun > testTypeParameterWithVarianceDifferentUpperBoundsBReverse() {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsBReverse() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsC() {} + fun > testTypeParameterWithVarianceDifferentUpperBoundsC() {} + + fun > testTypeParameterWithVarianceDifferentUpperBoundsCReverse() {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsCReverse() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsD() {} + fun > testTypeParameterWithVarianceDifferentUpperBoundsD() {} + + fun > testTypeParameterWithVarianceDifferentUpperBoundsDReverse() {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsDReverse() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsE() {} + fun > testTypeParameterWithVarianceDifferentUpperBoundsE() {} + + fun > testTypeParameterWithVarianceDifferentUpperBoundsEReverse() {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsEReverse() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsF() {} + fun > testTypeParameterWithVarianceDifferentUpperBoundsF() {} + + fun > testTypeParameterWithVarianceDifferentUpperBoundsFReverse() {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsFReverse() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithTypeAliasedUpperBoundsA() {} + fun testTypeParameterWithTypeAliasedUpperBoundsA() {} + + fun testTypeParameterWithTypeAliasedUpperBoundsAReverse() {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithTypeAliasedUpperBoundsAReverse() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithTypeAliasedUpperBoundsB(arg: T) {} + fun testTypeParameterWithTypeAliasedUpperBoundsB(arg: T) {} + + fun testTypeParameterWithTypeAliasedUpperBoundsBReverse(arg: T) {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithTypeAliasedUpperBoundsBReverse(arg: T) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithTypeAliasedUpperBoundsC(arg: Invariant) {} + fun testTypeParameterWithTypeAliasedUpperBoundsC(arg: Invariant) {} + + fun testTypeParameterWithTypeAliasedUpperBoundsCReverse(arg: Invariant) {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithTypeAliasedUpperBoundsCReverse(arg: Invariant) {} + + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleIdenticalUpperBoundsAA() where T: UserInterfaceA, T: UserInterfaceB {} + fun testTypeParameterWithMultipleIdenticalUpperBoundsAA() where T: UserInterfaceA, T: UserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleIdenticalUpperBoundsAB(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} + fun testTypeParameterWithMultipleIdenticalUpperBoundsAB(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleIdenticalUpperBoundsAC(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} + fun testTypeParameterWithMultipleIdenticalUpperBoundsAC(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleIdenticalUpperBoundsBA() where T: UserInterfaceB {} + fun testTypeParameterWithMultipleIdenticalUpperBoundsBA() where T: UserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleIdenticalUpperBoundsBB(arg: T) where T: UserInterfaceB {} + fun testTypeParameterWithMultipleIdenticalUpperBoundsBB(arg: T) where T: UserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleIdenticalUpperBoundsBC(arg: Invariant) where T: UserInterfaceB {} + fun testTypeParameterWithMultipleIdenticalUpperBoundsBC(arg: Invariant) where T: UserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInTypeParameterMultipleUpperBoundsPresenceA() where T: UserInterfaceA, T: UserInterfaceB {} + fun testDifferencesInTypeParameterMultipleUpperBoundsPresenceA() where T: UserInterfaceA {} + + fun testDifferencesInTypeParameterMultipleUpperBoundsPresenceB() where T: UserInterfaceB {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInTypeParameterMultipleUpperBoundsPresenceB() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleDifferentUpperBoundsAA() where T: UserInterfaceA, T: UserInterfaceB {} + fun testTypeParameterWithMultipleDifferentUpperBoundsAA() where T: UserInterfaceA, T: UserInterfaceC {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleDifferentUpperBoundsAB() where T: UserInterfaceB {} + fun testTypeParameterWithMultipleDifferentUpperBoundsAB() where T: UserInterfaceC {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleDifferentUpperBoundsAC() where T: UserInterfaceA {} + fun testTypeParameterWithMultipleDifferentUpperBoundsAC() where T: UserInterfaceA {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleDifferentUpperBoundsBA() where T: UserInterfaceA, T: UserInterfaceB {} + fun testTypeParameterWithMultipleDifferentUpperBoundsBA() where T: UserInterfaceC, T: UserInterfaceD {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleDifferentUpperBoundsBB() where T: UserInterfaceB {} + fun testTypeParameterWithMultipleDifferentUpperBoundsBB() where T: UserInterfaceD {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAA() where T: UserInterfaceA, T: UserInterfaceB {} + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAA() where T: UserInterfaceA, T: SameUserInterfaceB {} + + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAAReverse() where T: UserInterfaceA, T: UserInterfaceB {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAAReverse() where T: UserInterfaceA, T: SameUserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAB(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAB(arg: T) where T: UserInterfaceA, T: SameUserInterfaceB {} + + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAABReverse(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAABReverse(arg: T) where T: UserInterfaceA, T: SameUserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAC(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAC(arg: Invariant) where T: UserInterfaceA, T: SameUserInterfaceB {} + + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAACReverse(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAACReverse(arg: Invariant) where T: UserInterfaceA, T: SameUserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABA() where T: UserInterfaceB {} + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABA() where T: SameUserInterfaceB {} + + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABAReverse() where T: UserInterfaceB {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABAReverse() where T: SameUserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABB(arg: T) where T: UserInterfaceB {} + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABB(arg: T) where T: SameUserInterfaceB {} + + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABBReverse(arg: T) where T: UserInterfaceB {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABBReverse(arg: T) where T: SameUserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABC(arg: Invariant) where T: UserInterfaceB {} + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABC(arg: Invariant) where T: SameUserInterfaceB {} + + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABCReverse(arg: Invariant) where T: UserInterfaceB {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABCReverse(arg: Invariant) where T: SameUserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACA() where T: UserInterfaceA {} + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACA() where T: UserInterfaceA {} + + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACAReverse() where T: UserInterfaceA {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACAReverse() where T: UserInterfaceA {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACB(arg: T) where T: UserInterfaceA {} + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACB(arg: T) where T: UserInterfaceA {} + + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACBReverse(arg: T) where T: UserInterfaceA {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACBReverse(arg: T) where T: UserInterfaceA {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACC(arg: Invariant) where T: UserInterfaceA {} + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACC(arg: Invariant) where T: UserInterfaceA {} + + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACCReverse(arg: Invariant) where T: UserInterfaceA {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACCReverse(arg: Invariant) where T: UserInterfaceA {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAA() where T: UserInterfaceA, T: UserInterfaceB {} + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAA() where T: SameUserInterfaceA, T: SameUserInterfaceB {} + + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAAReverse() where T: UserInterfaceA, T: UserInterfaceB {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAAReverse() where T: SameUserInterfaceA, T: SameUserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAB(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAB(arg: T) where T: SameUserInterfaceA, T: SameUserInterfaceB {} + + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBABReverse(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBABReverse(arg: T) where T: SameUserInterfaceA, T: SameUserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAC(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAC(arg: Invariant) where T: SameUserInterfaceA, T: SameUserInterfaceB {} + + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBACReverse(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBACReverse(arg: Invariant) where T: SameUserInterfaceA, T: SameUserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBA() where T: UserInterfaceB {} + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBA() where T: SameUserInterfaceB {} + + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBAReverse() where T: UserInterfaceB {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBAReverse() where T: SameUserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBB(arg: T) where T: UserInterfaceB {} + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBB(arg: T) where T: SameUserInterfaceB {} + + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBBReverse(arg: T) where T: UserInterfaceB {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBBReverse(arg: T) where T: SameUserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBC(arg: Invariant) where T: UserInterfaceB {} + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBC(arg: Invariant) where T: SameUserInterfaceB {} + + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBCReverse(arg: Invariant) where T: UserInterfaceB {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBCReverse(arg: Invariant) where T: SameUserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleShuffledUpperBoundsAA() where T: UserInterfaceA, T: UserInterfaceB {} + fun testTypeParameterWithMultipleShuffledUpperBoundsAA() where T: UserInterfaceB, T: UserInterfaceA {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleShuffledUpperBoundsAB(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} + fun testTypeParameterWithMultipleShuffledUpperBoundsAB(arg: T) where T: UserInterfaceB, T: UserInterfaceA {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleShuffledUpperBoundsAC(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} + fun testTypeParameterWithMultipleShuffledUpperBoundsAC(arg: Invariant) where T: UserInterfaceB, T: UserInterfaceA {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleShuffledUpperBoundsBA() where T: UserInterfaceB {} + fun testTypeParameterWithMultipleShuffledUpperBoundsBA() where T: UserInterfaceA {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleShuffledUpperBoundsBB(arg: T) where T: UserInterfaceB {} + fun testTypeParameterWithMultipleShuffledUpperBoundsBB(arg: T) where T: UserInterfaceA {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleShuffledUpperBoundsBC(arg: Invariant) where T: UserInterfaceB {} + fun testTypeParameterWithMultipleShuffledUpperBoundsBC(arg: Invariant) where T: UserInterfaceA {} + + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testIdenticalReifiedTypeParameterA() {} + inline fun testIdenticalReifiedTypeParameterA() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testIdenticalReifiedTypeParameterB(arg: T) {} + inline fun testIdenticalReifiedTypeParameterB(arg: T) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testIdenticalReifiedTypeParameterC(arg: Invariant) {} + inline fun testIdenticalReifiedTypeParameterC(arg: Invariant) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testDifferencesInReifiedBehaviorOfTypeParameterA() {} + inline fun testDifferencesInReifiedBehaviorOfTypeParameterA() {} + + inline fun testDifferencesInReifiedBehaviorOfTypeParameterAReverse() {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testDifferencesInReifiedBehaviorOfTypeParameterAReverse() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testDifferencesInReifiedBehaviorOfTypeParameterB(arg: T) {} + inline fun testDifferencesInReifiedBehaviorOfTypeParameterB(arg: T) {} + + inline fun testDifferencesInReifiedBehaviorOfTypeParameterBReverse(arg: T) {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testDifferencesInReifiedBehaviorOfTypeParameterBReverse(arg: T) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testDifferencesInReifiedBehaviorOfTypeParameterC(arg: Invariant) {} + inline fun testDifferencesInReifiedBehaviorOfTypeParameterC(arg: Invariant) {} + + inline fun testDifferencesInReifiedBehaviorOfTypeParameterCReverse(arg: Invariant) {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testDifferencesInReifiedBehaviorOfTypeParameterCReverse(arg: Invariant) {} + + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testIdenticalPresenceOfInlineModifier() {} + inline fun testIdenticalPresenceOfInlineModifier() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testDifferencesInInlineModifierPresence() {} + fun testDifferencesInInlineModifierPresence() {} + + inline fun testDifferencesInInlineModifierPresenceReverse() {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInInlineModifierPresenceReverse() {} + + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) infix fun UserKlass.testIdenticalPresenceOfInfixModifier(arg: UserKlass) {} + infix fun UserKlass.testIdenticalPresenceOfInfixModifier(arg: UserKlass) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) infix fun UserKlass.testDifferencesInInfixModifierPresence(arg: UserKlass) {} + fun UserKlass.testDifferencesInInfixModifierPresence(arg: UserKlass) {} + + infix fun UserKlass.testDifferencesInInfixModifierPresenceReverse(arg: UserKlass) {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun UserKlass.testDifferencesInInfixModifierPresenceReverse(arg: UserKlass) {} + + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) operator fun UserKlassA.unaryPlus() {} + operator fun UserKlassA.unaryPlus() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) operator fun UserKlassB.unaryPlus() {} + fun UserKlassB.unaryPlus() {} + + operator fun UserKlassB.unaryMinus() {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun UserKlassB.unaryMinus() {} + + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) tailrec fun testIdenticalPresenceOfTailrecModifier() {} + tailrec fun testIdenticalPresenceOfTailrecModifier() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) tailrec fun testDifferencesInTailrecModifierPresence() {} + fun testDifferencesInTailrecModifierPresence() {} + + tailrec fun testDifferencesInTailrecModifierPresenceReverse() {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInTailrecModifierPresenceReverse() {} + + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private fun testIdenticalPrivateVisibility() {} + private fun testIdenticalPrivateVisibility() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal fun testIdenticalInternalVisibility() {} + internal fun testIdenticalInternalVisibility() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private fun testDifferencesInPrivateAndPublicVisibilities() {} + public fun testDifferencesInPrivateAndPublicVisibilities() {} + + private fun testDifferencesInPrivateAndPublicVisibilitiesReverse() {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) public fun testDifferencesInPrivateAndPublicVisibilitiesReverse() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal fun testDifferencesInInternalAndPublicVisibilities() {} + public fun testDifferencesInInternalAndPublicVisibilities() {} + + internal fun testDifferencesInInternalAndPublicVisibilitiesReverse() {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) public fun testDifferencesInInternalAndPublicVisibilitiesReverse() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private fun testDifferencesInPrivateAndInternalVisibilities() {} + internal fun testDifferencesInPrivateAndInternalVisibilities() {} + + private fun testDifferencesInPrivateAndInternalVisibilitiesReverse() {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal fun testDifferencesInPrivateAndInternalVisibilitiesReverse() {} + + +} + + +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/FunctionsInMemberScope.kt b/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/FunctionsInMemberScope.kt new file mode 100644 index 00000000000..ae368541762 --- /dev/null +++ b/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/FunctionsInMemberScope.kt @@ -0,0 +1,500 @@ +// DIAGNOSTICS: -MISPLACED_TYPE_PARAMETER_CONSTRAINTS, -NOTHING_TO_INLINE, -NO_TAIL_CALLS_FOUND + + +class MemberScope { + + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testBasic() {} + fun testBasic() {} + + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testIdenticalReturnTypes(): UserKlass = UserKlass() + fun testIdenticalReturnTypes(): UserKlass = UserKlass() + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInReturnTypePresence(): Unit {} + fun testDifferencesInReturnTypePresence() {} + + fun testDifferencesInReturnTypePresenceReverse(): Unit {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInReturnTypePresenceReverse() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferentReturnTypes(): UserKlassA = UserKlassA() + fun testDifferentReturnTypes(): UserKlassB = UserKlassB() + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesA(): Invariant = Invariant() + fun testVarianceDifferentReturnTypesA(): Invariant = Invariant() + + fun testVarianceDifferentReturnTypesAReverse(): Invariant = Invariant() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesAReverse(): Invariant = Invariant() + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesB(): Invariant = Invariant() + fun testVarianceDifferentReturnTypesB(): Invariant = Invariant() + + fun testVarianceDifferentReturnTypesBReverse(): Invariant = Invariant() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesBReverse(): Invariant = Invariant() + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesC(): Invariant = Invariant() + fun testVarianceDifferentReturnTypesC(): Invariant<*> = Invariant() + + fun testVarianceDifferentReturnTypesCReverse(): Invariant = Invariant() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesCReverse(): Invariant<*> = Invariant() + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesD(): Invariant = Invariant() + fun testVarianceDifferentReturnTypesD(): Invariant<*> = Invariant() + + fun testVarianceDifferentReturnTypesDReverse(): Invariant = Invariant() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesDReverse(): Invariant<*> = Invariant() + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesE(): Invariant = Invariant() + fun testVarianceDifferentReturnTypesE(): Invariant<*> = Invariant() + + fun testVarianceDifferentReturnTypesEReverse(): Invariant = Invariant() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesEReverse(): Invariant<*> = Invariant() + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesF(): Invariant = Invariant() + fun testVarianceDifferentReturnTypesF(): Invariant = Invariant() + + fun testVarianceDifferentReturnTypesFReverse(): Invariant = Invariant() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesFReverse(): Invariant = Invariant() + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeAliasedReturnTypes(): UserKlass = UserKlass() + fun testTypeAliasedReturnTypes(): SameUserKlass = UserKlass() + + fun testTypeAliasedReturnTypesReverse(): UserKlass = UserKlass() + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeAliasedReturnTypesReverse(): SameUserKlass = UserKlass() + + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun UserKlass.testIdenticalExtensionReceivers() {} + fun UserKlass.testIdenticalExtensionReceivers() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun UserKlass.testTypeAliasedExtensionReceivers() {} + fun SameUserKlass.testTypeAliasedExtensionReceivers() {} + + fun UserKlass.testTypeAliasedExtensionReceiversReverse() {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun SameUserKlass.testTypeAliasedExtensionReceiversReverse() {} + + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testIdenticalValueParameters(arg: UserKlass) {} + fun testIdenticalValueParameters(arg: UserKlass) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferentlyNamedValueParameters(argA: UserKlass) {} + fun testDifferentlyNamedValueParameters(argB: UserKlass) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeAliasedValueParameterTypes(arg: UserKlass) {} + fun testTypeAliasedValueParameterTypes(arg: SameUserKlass) {} + + fun testTypeAliasedValueParameterTypesReverse(arg: UserKlass) {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeAliasedValueParameterTypesReverse(arg: SameUserKlass) {} + + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleIdenticalValueParameters(arg1: UserKlassA, arg2: UserKlassB) {} + fun testMultipleIdenticalValueParameters(arg1: UserKlassA, arg2: UserKlassB) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleDifferentlyNamedValueParametersA(arg1: UserKlassA, arg2A: UserKlassB) {} + fun testMultipleDifferentlyNamedValueParametersA(arg1: UserKlassA, arg2B: UserKlassB) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleDifferentlyNamedValueParametersB(arg1A: UserKlassA, arg2A: UserKlassB) {} + fun testMultipleDifferentlyNamedValueParametersB(arg1B: UserKlassA, arg2B: UserKlassB) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleTypeAliasedValueParameterTypesA(arg1: UserKlassA, arg2: UserKlassB) {} + fun testMultipleTypeAliasedValueParameterTypesA(arg1: UserKlassA, arg2: SameUserKlassB) {} + + fun testMultipleTypeAliasedValueParameterTypesAReverse(arg1: UserKlassA, arg2: UserKlassB) {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleTypeAliasedValueParameterTypesAReverse(arg1: UserKlassA, arg2: SameUserKlassB) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleTypeAliasedValueParameterTypesB(arg1: UserKlassA, arg2: UserKlassB) {} + fun testMultipleTypeAliasedValueParameterTypesB(arg1: SameUserKlassA, arg2: SameUserKlassB) {} + + fun testMultipleTypeAliasedValueParameterTypesBReverse(arg1: UserKlassA, arg2: UserKlassB) {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleTypeAliasedValueParameterTypesBReverse(arg1: SameUserKlassA, arg2: SameUserKlassB) {} + + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testValueParameterWithIdenticalDefaultArguments(arg: UserKlass = defaultArgument) {} + fun testValueParameterWithIdenticalDefaultArguments(arg: UserKlass = defaultArgument) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInValueParameterDefaultArgumentsPresence(arg: UserKlass = defaultArgument) {} + fun testDifferencesInValueParameterDefaultArgumentsPresence(arg: UserKlass) {} + + fun testDifferencesInValueParameterDefaultArgumentsPresenceReverse(arg: UserKlass = defaultArgument) {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInValueParameterDefaultArgumentsPresenceReverse(arg: UserKlass) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testValueParameterWithDifferentDefaultArguments(arg: UserKlass = defaultArgumentA) {} + fun testValueParameterWithDifferentDefaultArguments(arg: UserKlass = defaultArgumentB) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testValueParameterWithAliasedDefaultArguments(arg: UserKlass = defaultArgument) {} + fun testValueParameterWithAliasedDefaultArguments(arg: UserKlass = sameDefaultArgument) {} + + fun testValueParameterWithAliasedDefaultArgumentsReverse(arg: UserKlass = defaultArgument) {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testValueParameterWithAliasedDefaultArgumentsReverse(arg: UserKlass = sameDefaultArgument) {} + + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testIdenticalTypeParametersA() {} + fun testIdenticalTypeParametersA() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testIdenticalTypeParametersB(arg: T) {} + fun testIdenticalTypeParametersB(arg: T) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testIdenticalTypeParametersC(arg: Invariant) {} + fun testIdenticalTypeParametersC(arg: Invariant) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferentlyNamedTypeParametersA() {} + fun testDifferentlyNamedTypeParametersA() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferentlyNamedTypeParametersB(arg: TA) {} + fun testDifferentlyNamedTypeParametersB(arg: TB) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferentlyNamedTypeParametersC(arg: Invariant) {} + fun testDifferentlyNamedTypeParametersC(arg: Invariant) {} + + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleIdenticalTypeParameters() {} + fun testMultipleIdenticalTypeParameters() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleDifferentlyNamedTypeParametersA() {} + fun testMultipleDifferentlyNamedTypeParametersA() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleDifferentlyNamedTypeParametersB() {} + fun testMultipleDifferentlyNamedTypeParametersB() {} + + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithIdenticalUpperBoundsA() {} + fun testTypeParameterWithIdenticalUpperBoundsA() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithIdenticalUpperBoundsB(arg: T) {} + fun testTypeParameterWithIdenticalUpperBoundsB(arg: T) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithIdenticalUpperBoundsC(arg: Invariant) {} + fun testTypeParameterWithIdenticalUpperBoundsC(arg: Invariant) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInTypeParameterUpperBoundsPresence() {} + fun testDifferencesInTypeParameterUpperBoundsPresence() {} + + fun testDifferencesInTypeParameterUpperBoundsPresenceReverse() {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInTypeParameterUpperBoundsPresenceReverse() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithDifferentUpperBounds() {} + fun testTypeParameterWithDifferentUpperBounds() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsA() {} + fun > testTypeParameterWithVarianceDifferentUpperBoundsA() {} + + fun > testTypeParameterWithVarianceDifferentUpperBoundsAReverse() {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsAReverse() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsB() {} + fun > testTypeParameterWithVarianceDifferentUpperBoundsB() {} + + fun > testTypeParameterWithVarianceDifferentUpperBoundsBReverse() {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsBReverse() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsC() {} + fun > testTypeParameterWithVarianceDifferentUpperBoundsC() {} + + fun > testTypeParameterWithVarianceDifferentUpperBoundsCReverse() {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsCReverse() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsD() {} + fun > testTypeParameterWithVarianceDifferentUpperBoundsD() {} + + fun > testTypeParameterWithVarianceDifferentUpperBoundsDReverse() {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsDReverse() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsE() {} + fun > testTypeParameterWithVarianceDifferentUpperBoundsE() {} + + fun > testTypeParameterWithVarianceDifferentUpperBoundsEReverse() {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsEReverse() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsF() {} + fun > testTypeParameterWithVarianceDifferentUpperBoundsF() {} + + fun > testTypeParameterWithVarianceDifferentUpperBoundsFReverse() {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsFReverse() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithTypeAliasedUpperBoundsA() {} + fun testTypeParameterWithTypeAliasedUpperBoundsA() {} + + fun testTypeParameterWithTypeAliasedUpperBoundsAReverse() {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithTypeAliasedUpperBoundsAReverse() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithTypeAliasedUpperBoundsB(arg: T) {} + fun testTypeParameterWithTypeAliasedUpperBoundsB(arg: T) {} + + fun testTypeParameterWithTypeAliasedUpperBoundsBReverse(arg: T) {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithTypeAliasedUpperBoundsBReverse(arg: T) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithTypeAliasedUpperBoundsC(arg: Invariant) {} + fun testTypeParameterWithTypeAliasedUpperBoundsC(arg: Invariant) {} + + fun testTypeParameterWithTypeAliasedUpperBoundsCReverse(arg: Invariant) {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithTypeAliasedUpperBoundsCReverse(arg: Invariant) {} + + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleIdenticalUpperBoundsAA() where T: UserInterfaceA, T: UserInterfaceB {} + fun testTypeParameterWithMultipleIdenticalUpperBoundsAA() where T: UserInterfaceA, T: UserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleIdenticalUpperBoundsAB(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} + fun testTypeParameterWithMultipleIdenticalUpperBoundsAB(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleIdenticalUpperBoundsAC(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} + fun testTypeParameterWithMultipleIdenticalUpperBoundsAC(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleIdenticalUpperBoundsBA() where T: UserInterfaceB {} + fun testTypeParameterWithMultipleIdenticalUpperBoundsBA() where T: UserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleIdenticalUpperBoundsBB(arg: T) where T: UserInterfaceB {} + fun testTypeParameterWithMultipleIdenticalUpperBoundsBB(arg: T) where T: UserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleIdenticalUpperBoundsBC(arg: Invariant) where T: UserInterfaceB {} + fun testTypeParameterWithMultipleIdenticalUpperBoundsBC(arg: Invariant) where T: UserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInTypeParameterMultipleUpperBoundsPresenceA() where T: UserInterfaceA, T: UserInterfaceB {} + fun testDifferencesInTypeParameterMultipleUpperBoundsPresenceA() where T: UserInterfaceA {} + + fun testDifferencesInTypeParameterMultipleUpperBoundsPresenceB() where T: UserInterfaceB {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInTypeParameterMultipleUpperBoundsPresenceB() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleDifferentUpperBoundsAA() where T: UserInterfaceA, T: UserInterfaceB {} + fun testTypeParameterWithMultipleDifferentUpperBoundsAA() where T: UserInterfaceA, T: UserInterfaceC {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleDifferentUpperBoundsAB() where T: UserInterfaceB {} + fun testTypeParameterWithMultipleDifferentUpperBoundsAB() where T: UserInterfaceC {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleDifferentUpperBoundsAC() where T: UserInterfaceA {} + fun testTypeParameterWithMultipleDifferentUpperBoundsAC() where T: UserInterfaceA {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleDifferentUpperBoundsBA() where T: UserInterfaceA, T: UserInterfaceB {} + fun testTypeParameterWithMultipleDifferentUpperBoundsBA() where T: UserInterfaceC, T: UserInterfaceD {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleDifferentUpperBoundsBB() where T: UserInterfaceB {} + fun testTypeParameterWithMultipleDifferentUpperBoundsBB() where T: UserInterfaceD {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAA() where T: UserInterfaceA, T: UserInterfaceB {} + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAA() where T: UserInterfaceA, T: SameUserInterfaceB {} + + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAAReverse() where T: UserInterfaceA, T: UserInterfaceB {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAAReverse() where T: UserInterfaceA, T: SameUserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAB(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAB(arg: T) where T: UserInterfaceA, T: SameUserInterfaceB {} + + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAABReverse(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAABReverse(arg: T) where T: UserInterfaceA, T: SameUserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAC(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAC(arg: Invariant) where T: UserInterfaceA, T: SameUserInterfaceB {} + + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAACReverse(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAACReverse(arg: Invariant) where T: UserInterfaceA, T: SameUserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABA() where T: UserInterfaceB {} + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABA() where T: SameUserInterfaceB {} + + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABAReverse() where T: UserInterfaceB {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABAReverse() where T: SameUserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABB(arg: T) where T: UserInterfaceB {} + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABB(arg: T) where T: SameUserInterfaceB {} + + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABBReverse(arg: T) where T: UserInterfaceB {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABBReverse(arg: T) where T: SameUserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABC(arg: Invariant) where T: UserInterfaceB {} + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABC(arg: Invariant) where T: SameUserInterfaceB {} + + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABCReverse(arg: Invariant) where T: UserInterfaceB {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABCReverse(arg: Invariant) where T: SameUserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACA() where T: UserInterfaceA {} + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACA() where T: UserInterfaceA {} + + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACAReverse() where T: UserInterfaceA {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACAReverse() where T: UserInterfaceA {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACB(arg: T) where T: UserInterfaceA {} + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACB(arg: T) where T: UserInterfaceA {} + + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACBReverse(arg: T) where T: UserInterfaceA {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACBReverse(arg: T) where T: UserInterfaceA {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACC(arg: Invariant) where T: UserInterfaceA {} + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACC(arg: Invariant) where T: UserInterfaceA {} + + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACCReverse(arg: Invariant) where T: UserInterfaceA {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACCReverse(arg: Invariant) where T: UserInterfaceA {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAA() where T: UserInterfaceA, T: UserInterfaceB {} + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAA() where T: SameUserInterfaceA, T: SameUserInterfaceB {} + + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAAReverse() where T: UserInterfaceA, T: UserInterfaceB {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAAReverse() where T: SameUserInterfaceA, T: SameUserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAB(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAB(arg: T) where T: SameUserInterfaceA, T: SameUserInterfaceB {} + + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBABReverse(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBABReverse(arg: T) where T: SameUserInterfaceA, T: SameUserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAC(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAC(arg: Invariant) where T: SameUserInterfaceA, T: SameUserInterfaceB {} + + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBACReverse(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBACReverse(arg: Invariant) where T: SameUserInterfaceA, T: SameUserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBA() where T: UserInterfaceB {} + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBA() where T: SameUserInterfaceB {} + + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBAReverse() where T: UserInterfaceB {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBAReverse() where T: SameUserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBB(arg: T) where T: UserInterfaceB {} + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBB(arg: T) where T: SameUserInterfaceB {} + + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBBReverse(arg: T) where T: UserInterfaceB {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBBReverse(arg: T) where T: SameUserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBC(arg: Invariant) where T: UserInterfaceB {} + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBC(arg: Invariant) where T: SameUserInterfaceB {} + + fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBCReverse(arg: Invariant) where T: UserInterfaceB {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBCReverse(arg: Invariant) where T: SameUserInterfaceB {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleShuffledUpperBoundsAA() where T: UserInterfaceA, T: UserInterfaceB {} + fun testTypeParameterWithMultipleShuffledUpperBoundsAA() where T: UserInterfaceB, T: UserInterfaceA {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleShuffledUpperBoundsAB(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} + fun testTypeParameterWithMultipleShuffledUpperBoundsAB(arg: T) where T: UserInterfaceB, T: UserInterfaceA {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleShuffledUpperBoundsAC(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} + fun testTypeParameterWithMultipleShuffledUpperBoundsAC(arg: Invariant) where T: UserInterfaceB, T: UserInterfaceA {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleShuffledUpperBoundsBA() where T: UserInterfaceB {} + fun testTypeParameterWithMultipleShuffledUpperBoundsBA() where T: UserInterfaceA {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleShuffledUpperBoundsBB(arg: T) where T: UserInterfaceB {} + fun testTypeParameterWithMultipleShuffledUpperBoundsBB(arg: T) where T: UserInterfaceA {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleShuffledUpperBoundsBC(arg: Invariant) where T: UserInterfaceB {} + fun testTypeParameterWithMultipleShuffledUpperBoundsBC(arg: Invariant) where T: UserInterfaceA {} + + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testIdenticalReifiedTypeParameterA() {} + inline fun testIdenticalReifiedTypeParameterA() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testIdenticalReifiedTypeParameterB(arg: T) {} + inline fun testIdenticalReifiedTypeParameterB(arg: T) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testIdenticalReifiedTypeParameterC(arg: Invariant) {} + inline fun testIdenticalReifiedTypeParameterC(arg: Invariant) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testDifferencesInReifiedBehaviorOfTypeParameterA() {} + inline fun testDifferencesInReifiedBehaviorOfTypeParameterA() {} + + inline fun testDifferencesInReifiedBehaviorOfTypeParameterAReverse() {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testDifferencesInReifiedBehaviorOfTypeParameterAReverse() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testDifferencesInReifiedBehaviorOfTypeParameterB(arg: T) {} + inline fun testDifferencesInReifiedBehaviorOfTypeParameterB(arg: T) {} + + inline fun testDifferencesInReifiedBehaviorOfTypeParameterBReverse(arg: T) {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testDifferencesInReifiedBehaviorOfTypeParameterBReverse(arg: T) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testDifferencesInReifiedBehaviorOfTypeParameterC(arg: Invariant) {} + inline fun testDifferencesInReifiedBehaviorOfTypeParameterC(arg: Invariant) {} + + inline fun testDifferencesInReifiedBehaviorOfTypeParameterCReverse(arg: Invariant) {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testDifferencesInReifiedBehaviorOfTypeParameterCReverse(arg: Invariant) {} + + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testIdenticalPresenceOfInlineModifier() {} + inline fun testIdenticalPresenceOfInlineModifier() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testDifferencesInInlineModifierPresence() {} + fun testDifferencesInInlineModifierPresence() {} + + inline fun testDifferencesInInlineModifierPresenceReverse() {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInInlineModifierPresenceReverse() {} + + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) infix fun UserKlass.testIdenticalPresenceOfInfixModifier(arg: UserKlass) {} + infix fun UserKlass.testIdenticalPresenceOfInfixModifier(arg: UserKlass) {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) infix fun UserKlass.testDifferencesInInfixModifierPresence(arg: UserKlass) {} + fun UserKlass.testDifferencesInInfixModifierPresence(arg: UserKlass) {} + + infix fun UserKlass.testDifferencesInInfixModifierPresenceReverse(arg: UserKlass) {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun UserKlass.testDifferencesInInfixModifierPresenceReverse(arg: UserKlass) {} + + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) operator fun UserKlassA.unaryPlus() {} + operator fun UserKlassA.unaryPlus() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) operator fun UserKlassB.unaryPlus() {} + fun UserKlassB.unaryPlus() {} + + operator fun UserKlassB.unaryMinus() {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun UserKlassB.unaryMinus() {} + + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) tailrec fun testIdenticalPresenceOfTailrecModifier() {} + tailrec fun testIdenticalPresenceOfTailrecModifier() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) tailrec fun testDifferencesInTailrecModifierPresence() {} + fun testDifferencesInTailrecModifierPresence() {} + + tailrec fun testDifferencesInTailrecModifierPresenceReverse() {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInTailrecModifierPresenceReverse() {} + + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private fun testIdenticalPrivateVisibility() {} + private fun testIdenticalPrivateVisibility() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal fun testIdenticalInternalVisibility() {} + internal fun testIdenticalInternalVisibility() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private fun testDifferencesInPrivateAndPublicVisibilities() {} + public fun testDifferencesInPrivateAndPublicVisibilities() {} + + private fun testDifferencesInPrivateAndPublicVisibilitiesReverse() {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) public fun testDifferencesInPrivateAndPublicVisibilitiesReverse() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal fun testDifferencesInInternalAndPublicVisibilities() {} + public fun testDifferencesInInternalAndPublicVisibilities() {} + + internal fun testDifferencesInInternalAndPublicVisibilitiesReverse() {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) public fun testDifferencesInInternalAndPublicVisibilitiesReverse() {} + + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private fun testDifferencesInPrivateAndInternalVisibilities() {} + internal fun testDifferencesInPrivateAndInternalVisibilities() {} + + private fun testDifferencesInPrivateAndInternalVisibilitiesReverse() {} + @Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal fun testDifferencesInPrivateAndInternalVisibilitiesReverse() {} + + +} + + +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/FunctionsInPackage.fir.kt b/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/FunctionsInPackage.fir.kt new file mode 100644 index 00000000000..3c7b7545cb6 --- /dev/null +++ b/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/FunctionsInPackage.fir.kt @@ -0,0 +1,496 @@ +// DIAGNOSTICS: -MISPLACED_TYPE_PARAMETER_CONSTRAINTS, -NOTHING_TO_INLINE, -NO_TAIL_CALLS_FOUND + +package pkg + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testBasic() {} +fun testBasic() {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testIdenticalReturnTypes(): UserKlass = UserKlass() +fun testIdenticalReturnTypes(): UserKlass = UserKlass() + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInReturnTypePresence(): Unit {} +fun testDifferencesInReturnTypePresence() {} + +fun testDifferencesInReturnTypePresenceReverse(): Unit {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInReturnTypePresenceReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferentReturnTypes(): UserKlassA = UserKlassA() +fun testDifferentReturnTypes(): UserKlassB = UserKlassB() + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesA(): Invariant = Invariant() +fun testVarianceDifferentReturnTypesA(): Invariant = Invariant() + +fun testVarianceDifferentReturnTypesAReverse(): Invariant = Invariant() +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesAReverse(): Invariant = Invariant() + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesB(): Invariant = Invariant() +fun testVarianceDifferentReturnTypesB(): Invariant = Invariant() + +fun testVarianceDifferentReturnTypesBReverse(): Invariant = Invariant() +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesBReverse(): Invariant = Invariant() + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesC(): Invariant = Invariant() +fun testVarianceDifferentReturnTypesC(): Invariant<*> = Invariant() + +fun testVarianceDifferentReturnTypesCReverse(): Invariant = Invariant() +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesCReverse(): Invariant<*> = Invariant() + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesD(): Invariant = Invariant() +fun testVarianceDifferentReturnTypesD(): Invariant<*> = Invariant() + +fun testVarianceDifferentReturnTypesDReverse(): Invariant = Invariant() +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesDReverse(): Invariant<*> = Invariant() + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesE(): Invariant = Invariant() +fun testVarianceDifferentReturnTypesE(): Invariant<*> = Invariant() + +fun testVarianceDifferentReturnTypesEReverse(): Invariant = Invariant() +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesEReverse(): Invariant<*> = Invariant() + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesF(): Invariant = Invariant() +fun testVarianceDifferentReturnTypesF(): Invariant = Invariant() + +fun testVarianceDifferentReturnTypesFReverse(): Invariant = Invariant() +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesFReverse(): Invariant = Invariant() + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeAliasedReturnTypes(): UserKlass = UserKlass() +fun testTypeAliasedReturnTypes(): SameUserKlass = UserKlass() + +fun testTypeAliasedReturnTypesReverse(): UserKlass = UserKlass() +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeAliasedReturnTypesReverse(): SameUserKlass = UserKlass() + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun UserKlass.testIdenticalExtensionReceivers() {} +fun UserKlass.testIdenticalExtensionReceivers() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun UserKlass.testTypeAliasedExtensionReceivers() {} +fun SameUserKlass.testTypeAliasedExtensionReceivers() {} + +fun UserKlass.testTypeAliasedExtensionReceiversReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun SameUserKlass.testTypeAliasedExtensionReceiversReverse() {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testIdenticalValueParameters(arg: UserKlass) {} +fun testIdenticalValueParameters(arg: UserKlass) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferentlyNamedValueParameters(argA: UserKlass) {} +fun testDifferentlyNamedValueParameters(argB: UserKlass) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeAliasedValueParameterTypes(arg: UserKlass) {} +fun testTypeAliasedValueParameterTypes(arg: SameUserKlass) {} + +fun testTypeAliasedValueParameterTypesReverse(arg: UserKlass) {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeAliasedValueParameterTypesReverse(arg: SameUserKlass) {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleIdenticalValueParameters(arg1: UserKlassA, arg2: UserKlassB) {} +fun testMultipleIdenticalValueParameters(arg1: UserKlassA, arg2: UserKlassB) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleDifferentlyNamedValueParametersA(arg1: UserKlassA, arg2A: UserKlassB) {} +fun testMultipleDifferentlyNamedValueParametersA(arg1: UserKlassA, arg2B: UserKlassB) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleDifferentlyNamedValueParametersB(arg1A: UserKlassA, arg2A: UserKlassB) {} +fun testMultipleDifferentlyNamedValueParametersB(arg1B: UserKlassA, arg2B: UserKlassB) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleTypeAliasedValueParameterTypesA(arg1: UserKlassA, arg2: UserKlassB) {} +fun testMultipleTypeAliasedValueParameterTypesA(arg1: UserKlassA, arg2: SameUserKlassB) {} + +fun testMultipleTypeAliasedValueParameterTypesAReverse(arg1: UserKlassA, arg2: UserKlassB) {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleTypeAliasedValueParameterTypesAReverse(arg1: UserKlassA, arg2: SameUserKlassB) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleTypeAliasedValueParameterTypesB(arg1: UserKlassA, arg2: UserKlassB) {} +fun testMultipleTypeAliasedValueParameterTypesB(arg1: SameUserKlassA, arg2: SameUserKlassB) {} + +fun testMultipleTypeAliasedValueParameterTypesBReverse(arg1: UserKlassA, arg2: UserKlassB) {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleTypeAliasedValueParameterTypesBReverse(arg1: SameUserKlassA, arg2: SameUserKlassB) {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testValueParameterWithIdenticalDefaultArguments(arg: UserKlass = defaultArgument) {} +fun testValueParameterWithIdenticalDefaultArguments(arg: UserKlass = defaultArgument) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInValueParameterDefaultArgumentsPresence(arg: UserKlass = defaultArgument) {} +fun testDifferencesInValueParameterDefaultArgumentsPresence(arg: UserKlass) {} + +fun testDifferencesInValueParameterDefaultArgumentsPresenceReverse(arg: UserKlass = defaultArgument) {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInValueParameterDefaultArgumentsPresenceReverse(arg: UserKlass) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testValueParameterWithDifferentDefaultArguments(arg: UserKlass = defaultArgumentA) {} +fun testValueParameterWithDifferentDefaultArguments(arg: UserKlass = defaultArgumentB) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testValueParameterWithAliasedDefaultArguments(arg: UserKlass = defaultArgument) {} +fun testValueParameterWithAliasedDefaultArguments(arg: UserKlass = sameDefaultArgument) {} + +fun testValueParameterWithAliasedDefaultArgumentsReverse(arg: UserKlass = defaultArgument) {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testValueParameterWithAliasedDefaultArgumentsReverse(arg: UserKlass = sameDefaultArgument) {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testIdenticalTypeParametersA() {} +fun testIdenticalTypeParametersA() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testIdenticalTypeParametersB(arg: T) {} +fun testIdenticalTypeParametersB(arg: T) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testIdenticalTypeParametersC(arg: Invariant) {} +fun testIdenticalTypeParametersC(arg: Invariant) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferentlyNamedTypeParametersA() {} +fun testDifferentlyNamedTypeParametersA() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferentlyNamedTypeParametersB(arg: TA) {} +fun testDifferentlyNamedTypeParametersB(arg: TB) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferentlyNamedTypeParametersC(arg: Invariant) {} +fun testDifferentlyNamedTypeParametersC(arg: Invariant) {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleIdenticalTypeParameters() {} +fun testMultipleIdenticalTypeParameters() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleDifferentlyNamedTypeParametersA() {} +fun testMultipleDifferentlyNamedTypeParametersA() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleDifferentlyNamedTypeParametersB() {} +fun testMultipleDifferentlyNamedTypeParametersB() {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithIdenticalUpperBoundsA() {} +fun testTypeParameterWithIdenticalUpperBoundsA() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithIdenticalUpperBoundsB(arg: T) {} +fun testTypeParameterWithIdenticalUpperBoundsB(arg: T) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithIdenticalUpperBoundsC(arg: Invariant) {} +fun testTypeParameterWithIdenticalUpperBoundsC(arg: Invariant) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInTypeParameterUpperBoundsPresence() {} +fun testDifferencesInTypeParameterUpperBoundsPresence() {} + +fun testDifferencesInTypeParameterUpperBoundsPresenceReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInTypeParameterUpperBoundsPresenceReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithDifferentUpperBounds() {} +fun testTypeParameterWithDifferentUpperBounds() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsA() {} +fun > testTypeParameterWithVarianceDifferentUpperBoundsA() {} + +fun > testTypeParameterWithVarianceDifferentUpperBoundsAReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsAReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsB() {} +fun > testTypeParameterWithVarianceDifferentUpperBoundsB() {} + +fun > testTypeParameterWithVarianceDifferentUpperBoundsBReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsBReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsC() {} +fun > testTypeParameterWithVarianceDifferentUpperBoundsC() {} + +fun > testTypeParameterWithVarianceDifferentUpperBoundsCReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsCReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsD() {} +fun > testTypeParameterWithVarianceDifferentUpperBoundsD() {} + +fun > testTypeParameterWithVarianceDifferentUpperBoundsDReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsDReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsE() {} +fun > testTypeParameterWithVarianceDifferentUpperBoundsE() {} + +fun > testTypeParameterWithVarianceDifferentUpperBoundsEReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsEReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsF() {} +fun > testTypeParameterWithVarianceDifferentUpperBoundsF() {} + +fun > testTypeParameterWithVarianceDifferentUpperBoundsFReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsFReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithTypeAliasedUpperBoundsA() {} +fun testTypeParameterWithTypeAliasedUpperBoundsA() {} + +fun testTypeParameterWithTypeAliasedUpperBoundsAReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithTypeAliasedUpperBoundsAReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithTypeAliasedUpperBoundsB(arg: T) {} +fun testTypeParameterWithTypeAliasedUpperBoundsB(arg: T) {} + +fun testTypeParameterWithTypeAliasedUpperBoundsBReverse(arg: T) {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithTypeAliasedUpperBoundsBReverse(arg: T) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithTypeAliasedUpperBoundsC(arg: Invariant) {} +fun testTypeParameterWithTypeAliasedUpperBoundsC(arg: Invariant) {} + +fun testTypeParameterWithTypeAliasedUpperBoundsCReverse(arg: Invariant) {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithTypeAliasedUpperBoundsCReverse(arg: Invariant) {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleIdenticalUpperBoundsAA() where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleIdenticalUpperBoundsAA() where T: UserInterfaceA, T: UserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleIdenticalUpperBoundsAB(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleIdenticalUpperBoundsAB(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleIdenticalUpperBoundsAC(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleIdenticalUpperBoundsAC(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleIdenticalUpperBoundsBA() where T: UserInterfaceB {} +fun testTypeParameterWithMultipleIdenticalUpperBoundsBA() where T: UserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleIdenticalUpperBoundsBB(arg: T) where T: UserInterfaceB {} +fun testTypeParameterWithMultipleIdenticalUpperBoundsBB(arg: T) where T: UserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleIdenticalUpperBoundsBC(arg: Invariant) where T: UserInterfaceB {} +fun testTypeParameterWithMultipleIdenticalUpperBoundsBC(arg: Invariant) where T: UserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInTypeParameterMultipleUpperBoundsPresenceA() where T: UserInterfaceA, T: UserInterfaceB {} +fun testDifferencesInTypeParameterMultipleUpperBoundsPresenceA() where T: UserInterfaceA {} + +fun testDifferencesInTypeParameterMultipleUpperBoundsPresenceB() where T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInTypeParameterMultipleUpperBoundsPresenceB() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleDifferentUpperBoundsAA() where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleDifferentUpperBoundsAA() where T: UserInterfaceA, T: UserInterfaceC {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleDifferentUpperBoundsAB() where T: UserInterfaceB {} +fun testTypeParameterWithMultipleDifferentUpperBoundsAB() where T: UserInterfaceC {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleDifferentUpperBoundsAC() where T: UserInterfaceA {} +fun testTypeParameterWithMultipleDifferentUpperBoundsAC() where T: UserInterfaceA {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleDifferentUpperBoundsBA() where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleDifferentUpperBoundsBA() where T: UserInterfaceC, T: UserInterfaceD {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleDifferentUpperBoundsBB() where T: UserInterfaceB {} +fun testTypeParameterWithMultipleDifferentUpperBoundsBB() where T: UserInterfaceD {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAA() where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAA() where T: UserInterfaceA, T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAAReverse() where T: UserInterfaceA, T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAAReverse() where T: UserInterfaceA, T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAB(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAB(arg: T) where T: UserInterfaceA, T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAABReverse(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAABReverse(arg: T) where T: UserInterfaceA, T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAC(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAC(arg: Invariant) where T: UserInterfaceA, T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAACReverse(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAACReverse(arg: Invariant) where T: UserInterfaceA, T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABA() where T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABA() where T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABAReverse() where T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABAReverse() where T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABB(arg: T) where T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABB(arg: T) where T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABBReverse(arg: T) where T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABBReverse(arg: T) where T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABC(arg: Invariant) where T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABC(arg: Invariant) where T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABCReverse(arg: Invariant) where T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABCReverse(arg: Invariant) where T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACA() where T: UserInterfaceA {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACA() where T: UserInterfaceA {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACAReverse() where T: UserInterfaceA {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACAReverse() where T: UserInterfaceA {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACB(arg: T) where T: UserInterfaceA {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACB(arg: T) where T: UserInterfaceA {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACBReverse(arg: T) where T: UserInterfaceA {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACBReverse(arg: T) where T: UserInterfaceA {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACC(arg: Invariant) where T: UserInterfaceA {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACC(arg: Invariant) where T: UserInterfaceA {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACCReverse(arg: Invariant) where T: UserInterfaceA {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACCReverse(arg: Invariant) where T: UserInterfaceA {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAA() where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAA() where T: SameUserInterfaceA, T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAAReverse() where T: UserInterfaceA, T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAAReverse() where T: SameUserInterfaceA, T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAB(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAB(arg: T) where T: SameUserInterfaceA, T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBABReverse(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBABReverse(arg: T) where T: SameUserInterfaceA, T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAC(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAC(arg: Invariant) where T: SameUserInterfaceA, T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBACReverse(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBACReverse(arg: Invariant) where T: SameUserInterfaceA, T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBA() where T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBA() where T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBAReverse() where T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBAReverse() where T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBB(arg: T) where T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBB(arg: T) where T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBBReverse(arg: T) where T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBBReverse(arg: T) where T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBC(arg: Invariant) where T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBC(arg: Invariant) where T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBCReverse(arg: Invariant) where T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBCReverse(arg: Invariant) where T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleShuffledUpperBoundsAA() where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleShuffledUpperBoundsAA() where T: UserInterfaceB, T: UserInterfaceA {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleShuffledUpperBoundsAB(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleShuffledUpperBoundsAB(arg: T) where T: UserInterfaceB, T: UserInterfaceA {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleShuffledUpperBoundsAC(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleShuffledUpperBoundsAC(arg: Invariant) where T: UserInterfaceB, T: UserInterfaceA {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleShuffledUpperBoundsBA() where T: UserInterfaceB {} +fun testTypeParameterWithMultipleShuffledUpperBoundsBA() where T: UserInterfaceA {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleShuffledUpperBoundsBB(arg: T) where T: UserInterfaceB {} +fun testTypeParameterWithMultipleShuffledUpperBoundsBB(arg: T) where T: UserInterfaceA {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleShuffledUpperBoundsBC(arg: Invariant) where T: UserInterfaceB {} +fun testTypeParameterWithMultipleShuffledUpperBoundsBC(arg: Invariant) where T: UserInterfaceA {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testIdenticalReifiedTypeParameterA() {} +inline fun testIdenticalReifiedTypeParameterA() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testIdenticalReifiedTypeParameterB(arg: T) {} +inline fun testIdenticalReifiedTypeParameterB(arg: T) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testIdenticalReifiedTypeParameterC(arg: Invariant) {} +inline fun testIdenticalReifiedTypeParameterC(arg: Invariant) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testDifferencesInReifiedBehaviorOfTypeParameterA() {} +inline fun testDifferencesInReifiedBehaviorOfTypeParameterA() {} + +inline fun testDifferencesInReifiedBehaviorOfTypeParameterAReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testDifferencesInReifiedBehaviorOfTypeParameterAReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testDifferencesInReifiedBehaviorOfTypeParameterB(arg: T) {} +inline fun testDifferencesInReifiedBehaviorOfTypeParameterB(arg: T) {} + +inline fun testDifferencesInReifiedBehaviorOfTypeParameterBReverse(arg: T) {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testDifferencesInReifiedBehaviorOfTypeParameterBReverse(arg: T) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testDifferencesInReifiedBehaviorOfTypeParameterC(arg: Invariant) {} +inline fun testDifferencesInReifiedBehaviorOfTypeParameterC(arg: Invariant) {} + +inline fun testDifferencesInReifiedBehaviorOfTypeParameterCReverse(arg: Invariant) {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testDifferencesInReifiedBehaviorOfTypeParameterCReverse(arg: Invariant) {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testIdenticalPresenceOfInlineModifier() {} +inline fun testIdenticalPresenceOfInlineModifier() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testDifferencesInInlineModifierPresence() {} +fun testDifferencesInInlineModifierPresence() {} + +inline fun testDifferencesInInlineModifierPresenceReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInInlineModifierPresenceReverse() {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) infix fun UserKlass.testIdenticalPresenceOfInfixModifier(arg: UserKlass) {} +infix fun UserKlass.testIdenticalPresenceOfInfixModifier(arg: UserKlass) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) infix fun UserKlass.testDifferencesInInfixModifierPresence(arg: UserKlass) {} +fun UserKlass.testDifferencesInInfixModifierPresence(arg: UserKlass) {} + +infix fun UserKlass.testDifferencesInInfixModifierPresenceReverse(arg: UserKlass) {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun UserKlass.testDifferencesInInfixModifierPresenceReverse(arg: UserKlass) {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) operator fun UserKlassA.unaryPlus() {} +operator fun UserKlassA.unaryPlus() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) operator fun UserKlassB.unaryPlus() {} +fun UserKlassB.unaryPlus() {} + +operator fun UserKlassB.unaryMinus() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun UserKlassB.unaryMinus() {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) tailrec fun testIdenticalPresenceOfTailrecModifier() {} +tailrec fun testIdenticalPresenceOfTailrecModifier() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) tailrec fun testDifferencesInTailrecModifierPresence() {} +fun testDifferencesInTailrecModifierPresence() {} + +tailrec fun testDifferencesInTailrecModifierPresenceReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInTailrecModifierPresenceReverse() {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) private fun testIdenticalPrivateVisibility() {} +private fun testIdenticalPrivateVisibility() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal fun testIdenticalInternalVisibility() {} +internal fun testIdenticalInternalVisibility() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) private fun testDifferencesInPrivateAndPublicVisibilities() {} +public fun testDifferencesInPrivateAndPublicVisibilities() {} + +private fun testDifferencesInPrivateAndPublicVisibilitiesReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) public fun testDifferencesInPrivateAndPublicVisibilitiesReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal fun testDifferencesInInternalAndPublicVisibilities() {} +public fun testDifferencesInInternalAndPublicVisibilities() {} + +internal fun testDifferencesInInternalAndPublicVisibilitiesReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) public fun testDifferencesInInternalAndPublicVisibilitiesReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) private fun testDifferencesInPrivateAndInternalVisibilities() {} +internal fun testDifferencesInPrivateAndInternalVisibilities() {} + +private fun testDifferencesInPrivateAndInternalVisibilitiesReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal fun testDifferencesInPrivateAndInternalVisibilitiesReverse() {} + + +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/FunctionsInPackage.kt b/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/FunctionsInPackage.kt new file mode 100644 index 00000000000..212ad5bc062 --- /dev/null +++ b/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/FunctionsInPackage.kt @@ -0,0 +1,496 @@ +// DIAGNOSTICS: -MISPLACED_TYPE_PARAMETER_CONSTRAINTS, -NOTHING_TO_INLINE, -NO_TAIL_CALLS_FOUND + +package pkg + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testBasic() {} +fun testBasic() {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testIdenticalReturnTypes(): UserKlass = UserKlass() +fun testIdenticalReturnTypes(): UserKlass = UserKlass() + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInReturnTypePresence(): Unit {} +fun testDifferencesInReturnTypePresence() {} + +fun testDifferencesInReturnTypePresenceReverse(): Unit {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInReturnTypePresenceReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferentReturnTypes(): UserKlassA = UserKlassA() +fun testDifferentReturnTypes(): UserKlassB = UserKlassB() + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesA(): Invariant = Invariant() +fun testVarianceDifferentReturnTypesA(): Invariant = Invariant() + +fun testVarianceDifferentReturnTypesAReverse(): Invariant = Invariant() +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesAReverse(): Invariant = Invariant() + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesB(): Invariant = Invariant() +fun testVarianceDifferentReturnTypesB(): Invariant = Invariant() + +fun testVarianceDifferentReturnTypesBReverse(): Invariant = Invariant() +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesBReverse(): Invariant = Invariant() + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesC(): Invariant = Invariant() +fun testVarianceDifferentReturnTypesC(): Invariant<*> = Invariant() + +fun testVarianceDifferentReturnTypesCReverse(): Invariant = Invariant() +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesCReverse(): Invariant<*> = Invariant() + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesD(): Invariant = Invariant() +fun testVarianceDifferentReturnTypesD(): Invariant<*> = Invariant() + +fun testVarianceDifferentReturnTypesDReverse(): Invariant = Invariant() +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesDReverse(): Invariant<*> = Invariant() + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesE(): Invariant = Invariant() +fun testVarianceDifferentReturnTypesE(): Invariant<*> = Invariant() + +fun testVarianceDifferentReturnTypesEReverse(): Invariant = Invariant() +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesEReverse(): Invariant<*> = Invariant() + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesF(): Invariant = Invariant() +fun testVarianceDifferentReturnTypesF(): Invariant = Invariant() + +fun testVarianceDifferentReturnTypesFReverse(): Invariant = Invariant() +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesFReverse(): Invariant = Invariant() + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeAliasedReturnTypes(): UserKlass = UserKlass() +fun testTypeAliasedReturnTypes(): SameUserKlass = UserKlass() + +fun testTypeAliasedReturnTypesReverse(): UserKlass = UserKlass() +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeAliasedReturnTypesReverse(): SameUserKlass = UserKlass() + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun UserKlass.testIdenticalExtensionReceivers() {} +fun UserKlass.testIdenticalExtensionReceivers() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun UserKlass.testTypeAliasedExtensionReceivers() {} +fun SameUserKlass.testTypeAliasedExtensionReceivers() {} + +fun UserKlass.testTypeAliasedExtensionReceiversReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun SameUserKlass.testTypeAliasedExtensionReceiversReverse() {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testIdenticalValueParameters(arg: UserKlass) {} +fun testIdenticalValueParameters(arg: UserKlass) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferentlyNamedValueParameters(argA: UserKlass) {} +fun testDifferentlyNamedValueParameters(argB: UserKlass) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeAliasedValueParameterTypes(arg: UserKlass) {} +fun testTypeAliasedValueParameterTypes(arg: SameUserKlass) {} + +fun testTypeAliasedValueParameterTypesReverse(arg: UserKlass) {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeAliasedValueParameterTypesReverse(arg: SameUserKlass) {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleIdenticalValueParameters(arg1: UserKlassA, arg2: UserKlassB) {} +fun testMultipleIdenticalValueParameters(arg1: UserKlassA, arg2: UserKlassB) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleDifferentlyNamedValueParametersA(arg1: UserKlassA, arg2A: UserKlassB) {} +fun testMultipleDifferentlyNamedValueParametersA(arg1: UserKlassA, arg2B: UserKlassB) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleDifferentlyNamedValueParametersB(arg1A: UserKlassA, arg2A: UserKlassB) {} +fun testMultipleDifferentlyNamedValueParametersB(arg1B: UserKlassA, arg2B: UserKlassB) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleTypeAliasedValueParameterTypesA(arg1: UserKlassA, arg2: UserKlassB) {} +fun testMultipleTypeAliasedValueParameterTypesA(arg1: UserKlassA, arg2: SameUserKlassB) {} + +fun testMultipleTypeAliasedValueParameterTypesAReverse(arg1: UserKlassA, arg2: UserKlassB) {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleTypeAliasedValueParameterTypesAReverse(arg1: UserKlassA, arg2: SameUserKlassB) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleTypeAliasedValueParameterTypesB(arg1: UserKlassA, arg2: UserKlassB) {} +fun testMultipleTypeAliasedValueParameterTypesB(arg1: SameUserKlassA, arg2: SameUserKlassB) {} + +fun testMultipleTypeAliasedValueParameterTypesBReverse(arg1: UserKlassA, arg2: UserKlassB) {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleTypeAliasedValueParameterTypesBReverse(arg1: SameUserKlassA, arg2: SameUserKlassB) {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testValueParameterWithIdenticalDefaultArguments(arg: UserKlass = defaultArgument) {} +fun testValueParameterWithIdenticalDefaultArguments(arg: UserKlass = defaultArgument) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInValueParameterDefaultArgumentsPresence(arg: UserKlass = defaultArgument) {} +fun testDifferencesInValueParameterDefaultArgumentsPresence(arg: UserKlass) {} + +fun testDifferencesInValueParameterDefaultArgumentsPresenceReverse(arg: UserKlass = defaultArgument) {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInValueParameterDefaultArgumentsPresenceReverse(arg: UserKlass) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testValueParameterWithDifferentDefaultArguments(arg: UserKlass = defaultArgumentA) {} +fun testValueParameterWithDifferentDefaultArguments(arg: UserKlass = defaultArgumentB) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testValueParameterWithAliasedDefaultArguments(arg: UserKlass = defaultArgument) {} +fun testValueParameterWithAliasedDefaultArguments(arg: UserKlass = sameDefaultArgument) {} + +fun testValueParameterWithAliasedDefaultArgumentsReverse(arg: UserKlass = defaultArgument) {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testValueParameterWithAliasedDefaultArgumentsReverse(arg: UserKlass = sameDefaultArgument) {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testIdenticalTypeParametersA() {} +fun testIdenticalTypeParametersA() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testIdenticalTypeParametersB(arg: T) {} +fun testIdenticalTypeParametersB(arg: T) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testIdenticalTypeParametersC(arg: Invariant) {} +fun testIdenticalTypeParametersC(arg: Invariant) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferentlyNamedTypeParametersA() {} +fun testDifferentlyNamedTypeParametersA() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferentlyNamedTypeParametersB(arg: TA) {} +fun testDifferentlyNamedTypeParametersB(arg: TB) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferentlyNamedTypeParametersC(arg: Invariant) {} +fun testDifferentlyNamedTypeParametersC(arg: Invariant) {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleIdenticalTypeParameters() {} +fun testMultipleIdenticalTypeParameters() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleDifferentlyNamedTypeParametersA() {} +fun testMultipleDifferentlyNamedTypeParametersA() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleDifferentlyNamedTypeParametersB() {} +fun testMultipleDifferentlyNamedTypeParametersB() {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithIdenticalUpperBoundsA() {} +fun testTypeParameterWithIdenticalUpperBoundsA() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithIdenticalUpperBoundsB(arg: T) {} +fun testTypeParameterWithIdenticalUpperBoundsB(arg: T) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithIdenticalUpperBoundsC(arg: Invariant) {} +fun testTypeParameterWithIdenticalUpperBoundsC(arg: Invariant) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInTypeParameterUpperBoundsPresence() {} +fun testDifferencesInTypeParameterUpperBoundsPresence() {} + +fun testDifferencesInTypeParameterUpperBoundsPresenceReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInTypeParameterUpperBoundsPresenceReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithDifferentUpperBounds() {} +fun testTypeParameterWithDifferentUpperBounds() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsA() {} +fun > testTypeParameterWithVarianceDifferentUpperBoundsA() {} + +fun > testTypeParameterWithVarianceDifferentUpperBoundsAReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsAReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsB() {} +fun > testTypeParameterWithVarianceDifferentUpperBoundsB() {} + +fun > testTypeParameterWithVarianceDifferentUpperBoundsBReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsBReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsC() {} +fun > testTypeParameterWithVarianceDifferentUpperBoundsC() {} + +fun > testTypeParameterWithVarianceDifferentUpperBoundsCReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsCReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsD() {} +fun > testTypeParameterWithVarianceDifferentUpperBoundsD() {} + +fun > testTypeParameterWithVarianceDifferentUpperBoundsDReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsDReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsE() {} +fun > testTypeParameterWithVarianceDifferentUpperBoundsE() {} + +fun > testTypeParameterWithVarianceDifferentUpperBoundsEReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsEReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsF() {} +fun > testTypeParameterWithVarianceDifferentUpperBoundsF() {} + +fun > testTypeParameterWithVarianceDifferentUpperBoundsFReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsFReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithTypeAliasedUpperBoundsA() {} +fun testTypeParameterWithTypeAliasedUpperBoundsA() {} + +fun testTypeParameterWithTypeAliasedUpperBoundsAReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithTypeAliasedUpperBoundsAReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithTypeAliasedUpperBoundsB(arg: T) {} +fun testTypeParameterWithTypeAliasedUpperBoundsB(arg: T) {} + +fun testTypeParameterWithTypeAliasedUpperBoundsBReverse(arg: T) {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithTypeAliasedUpperBoundsBReverse(arg: T) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithTypeAliasedUpperBoundsC(arg: Invariant) {} +fun testTypeParameterWithTypeAliasedUpperBoundsC(arg: Invariant) {} + +fun testTypeParameterWithTypeAliasedUpperBoundsCReverse(arg: Invariant) {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithTypeAliasedUpperBoundsCReverse(arg: Invariant) {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleIdenticalUpperBoundsAA() where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleIdenticalUpperBoundsAA() where T: UserInterfaceA, T: UserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleIdenticalUpperBoundsAB(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleIdenticalUpperBoundsAB(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleIdenticalUpperBoundsAC(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleIdenticalUpperBoundsAC(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleIdenticalUpperBoundsBA() where T: UserInterfaceB {} +fun testTypeParameterWithMultipleIdenticalUpperBoundsBA() where T: UserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleIdenticalUpperBoundsBB(arg: T) where T: UserInterfaceB {} +fun testTypeParameterWithMultipleIdenticalUpperBoundsBB(arg: T) where T: UserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleIdenticalUpperBoundsBC(arg: Invariant) where T: UserInterfaceB {} +fun testTypeParameterWithMultipleIdenticalUpperBoundsBC(arg: Invariant) where T: UserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInTypeParameterMultipleUpperBoundsPresenceA() where T: UserInterfaceA, T: UserInterfaceB {} +fun testDifferencesInTypeParameterMultipleUpperBoundsPresenceA() where T: UserInterfaceA {} + +fun testDifferencesInTypeParameterMultipleUpperBoundsPresenceB() where T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInTypeParameterMultipleUpperBoundsPresenceB() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleDifferentUpperBoundsAA() where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleDifferentUpperBoundsAA() where T: UserInterfaceA, T: UserInterfaceC {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleDifferentUpperBoundsAB() where T: UserInterfaceB {} +fun testTypeParameterWithMultipleDifferentUpperBoundsAB() where T: UserInterfaceC {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleDifferentUpperBoundsAC() where T: UserInterfaceA {} +fun testTypeParameterWithMultipleDifferentUpperBoundsAC() where T: UserInterfaceA {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleDifferentUpperBoundsBA() where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleDifferentUpperBoundsBA() where T: UserInterfaceC, T: UserInterfaceD {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleDifferentUpperBoundsBB() where T: UserInterfaceB {} +fun testTypeParameterWithMultipleDifferentUpperBoundsBB() where T: UserInterfaceD {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAA() where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAA() where T: UserInterfaceA, T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAAReverse() where T: UserInterfaceA, T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAAReverse() where T: UserInterfaceA, T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAB(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAB(arg: T) where T: UserInterfaceA, T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAABReverse(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAABReverse(arg: T) where T: UserInterfaceA, T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAC(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAC(arg: Invariant) where T: UserInterfaceA, T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAACReverse(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAACReverse(arg: Invariant) where T: UserInterfaceA, T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABA() where T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABA() where T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABAReverse() where T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABAReverse() where T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABB(arg: T) where T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABB(arg: T) where T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABBReverse(arg: T) where T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABBReverse(arg: T) where T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABC(arg: Invariant) where T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABC(arg: Invariant) where T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABCReverse(arg: Invariant) where T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABCReverse(arg: Invariant) where T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACA() where T: UserInterfaceA {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACA() where T: UserInterfaceA {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACAReverse() where T: UserInterfaceA {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACAReverse() where T: UserInterfaceA {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACB(arg: T) where T: UserInterfaceA {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACB(arg: T) where T: UserInterfaceA {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACBReverse(arg: T) where T: UserInterfaceA {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACBReverse(arg: T) where T: UserInterfaceA {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACC(arg: Invariant) where T: UserInterfaceA {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACC(arg: Invariant) where T: UserInterfaceA {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACCReverse(arg: Invariant) where T: UserInterfaceA {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACCReverse(arg: Invariant) where T: UserInterfaceA {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAA() where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAA() where T: SameUserInterfaceA, T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAAReverse() where T: UserInterfaceA, T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAAReverse() where T: SameUserInterfaceA, T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAB(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAB(arg: T) where T: SameUserInterfaceA, T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBABReverse(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBABReverse(arg: T) where T: SameUserInterfaceA, T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAC(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAC(arg: Invariant) where T: SameUserInterfaceA, T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBACReverse(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBACReverse(arg: Invariant) where T: SameUserInterfaceA, T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBA() where T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBA() where T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBAReverse() where T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBAReverse() where T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBB(arg: T) where T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBB(arg: T) where T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBBReverse(arg: T) where T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBBReverse(arg: T) where T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBC(arg: Invariant) where T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBC(arg: Invariant) where T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBCReverse(arg: Invariant) where T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBCReverse(arg: Invariant) where T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleShuffledUpperBoundsAA() where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleShuffledUpperBoundsAA() where T: UserInterfaceB, T: UserInterfaceA {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleShuffledUpperBoundsAB(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleShuffledUpperBoundsAB(arg: T) where T: UserInterfaceB, T: UserInterfaceA {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleShuffledUpperBoundsAC(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleShuffledUpperBoundsAC(arg: Invariant) where T: UserInterfaceB, T: UserInterfaceA {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleShuffledUpperBoundsBA() where T: UserInterfaceB {} +fun testTypeParameterWithMultipleShuffledUpperBoundsBA() where T: UserInterfaceA {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleShuffledUpperBoundsBB(arg: T) where T: UserInterfaceB {} +fun testTypeParameterWithMultipleShuffledUpperBoundsBB(arg: T) where T: UserInterfaceA {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleShuffledUpperBoundsBC(arg: Invariant) where T: UserInterfaceB {} +fun testTypeParameterWithMultipleShuffledUpperBoundsBC(arg: Invariant) where T: UserInterfaceA {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testIdenticalReifiedTypeParameterA() {} +inline fun testIdenticalReifiedTypeParameterA() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testIdenticalReifiedTypeParameterB(arg: T) {} +inline fun testIdenticalReifiedTypeParameterB(arg: T) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testIdenticalReifiedTypeParameterC(arg: Invariant) {} +inline fun testIdenticalReifiedTypeParameterC(arg: Invariant) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testDifferencesInReifiedBehaviorOfTypeParameterA() {} +inline fun testDifferencesInReifiedBehaviorOfTypeParameterA() {} + +inline fun testDifferencesInReifiedBehaviorOfTypeParameterAReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testDifferencesInReifiedBehaviorOfTypeParameterAReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testDifferencesInReifiedBehaviorOfTypeParameterB(arg: T) {} +inline fun testDifferencesInReifiedBehaviorOfTypeParameterB(arg: T) {} + +inline fun testDifferencesInReifiedBehaviorOfTypeParameterBReverse(arg: T) {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testDifferencesInReifiedBehaviorOfTypeParameterBReverse(arg: T) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testDifferencesInReifiedBehaviorOfTypeParameterC(arg: Invariant) {} +inline fun testDifferencesInReifiedBehaviorOfTypeParameterC(arg: Invariant) {} + +inline fun testDifferencesInReifiedBehaviorOfTypeParameterCReverse(arg: Invariant) {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testDifferencesInReifiedBehaviorOfTypeParameterCReverse(arg: Invariant) {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testIdenticalPresenceOfInlineModifier() {} +inline fun testIdenticalPresenceOfInlineModifier() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testDifferencesInInlineModifierPresence() {} +fun testDifferencesInInlineModifierPresence() {} + +inline fun testDifferencesInInlineModifierPresenceReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInInlineModifierPresenceReverse() {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) infix fun UserKlass.testIdenticalPresenceOfInfixModifier(arg: UserKlass) {} +infix fun UserKlass.testIdenticalPresenceOfInfixModifier(arg: UserKlass) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) infix fun UserKlass.testDifferencesInInfixModifierPresence(arg: UserKlass) {} +fun UserKlass.testDifferencesInInfixModifierPresence(arg: UserKlass) {} + +infix fun UserKlass.testDifferencesInInfixModifierPresenceReverse(arg: UserKlass) {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun UserKlass.testDifferencesInInfixModifierPresenceReverse(arg: UserKlass) {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) operator fun UserKlassA.unaryPlus() {} +operator fun UserKlassA.unaryPlus() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) operator fun UserKlassB.unaryPlus() {} +fun UserKlassB.unaryPlus() {} + +operator fun UserKlassB.unaryMinus() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun UserKlassB.unaryMinus() {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) tailrec fun testIdenticalPresenceOfTailrecModifier() {} +tailrec fun testIdenticalPresenceOfTailrecModifier() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) tailrec fun testDifferencesInTailrecModifierPresence() {} +fun testDifferencesInTailrecModifierPresence() {} + +tailrec fun testDifferencesInTailrecModifierPresenceReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInTailrecModifierPresenceReverse() {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) private fun testIdenticalPrivateVisibility() {} +private fun testIdenticalPrivateVisibility() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal fun testIdenticalInternalVisibility() {} +internal fun testIdenticalInternalVisibility() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) private fun testDifferencesInPrivateAndPublicVisibilities() {} +public fun testDifferencesInPrivateAndPublicVisibilities() {} + +private fun testDifferencesInPrivateAndPublicVisibilitiesReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) public fun testDifferencesInPrivateAndPublicVisibilitiesReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal fun testDifferencesInInternalAndPublicVisibilities() {} +public fun testDifferencesInInternalAndPublicVisibilities() {} + +internal fun testDifferencesInInternalAndPublicVisibilitiesReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) public fun testDifferencesInInternalAndPublicVisibilitiesReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) private fun testDifferencesInPrivateAndInternalVisibilities() {} +internal fun testDifferencesInPrivateAndInternalVisibilities() {} + +private fun testDifferencesInPrivateAndInternalVisibilitiesReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal fun testDifferencesInPrivateAndInternalVisibilitiesReverse() {} + + +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/FunctionsOnTopLevel.fir.kt b/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/FunctionsOnTopLevel.fir.kt new file mode 100644 index 00000000000..8522e7793e2 --- /dev/null +++ b/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/FunctionsOnTopLevel.fir.kt @@ -0,0 +1,494 @@ +// DIAGNOSTICS: -MISPLACED_TYPE_PARAMETER_CONSTRAINTS, -NOTHING_TO_INLINE, -NO_TAIL_CALLS_FOUND + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testBasic() {} +fun testBasic() {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testIdenticalReturnTypes(): UserKlass = UserKlass() +fun testIdenticalReturnTypes(): UserKlass = UserKlass() + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInReturnTypePresence(): Unit {} +fun testDifferencesInReturnTypePresence() {} + +fun testDifferencesInReturnTypePresenceReverse(): Unit {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInReturnTypePresenceReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferentReturnTypes(): UserKlassA = UserKlassA() +fun testDifferentReturnTypes(): UserKlassB = UserKlassB() + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesA(): Invariant = Invariant() +fun testVarianceDifferentReturnTypesA(): Invariant = Invariant() + +fun testVarianceDifferentReturnTypesAReverse(): Invariant = Invariant() +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesAReverse(): Invariant = Invariant() + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesB(): Invariant = Invariant() +fun testVarianceDifferentReturnTypesB(): Invariant = Invariant() + +fun testVarianceDifferentReturnTypesBReverse(): Invariant = Invariant() +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesBReverse(): Invariant = Invariant() + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesC(): Invariant = Invariant() +fun testVarianceDifferentReturnTypesC(): Invariant<*> = Invariant() + +fun testVarianceDifferentReturnTypesCReverse(): Invariant = Invariant() +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesCReverse(): Invariant<*> = Invariant() + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesD(): Invariant = Invariant() +fun testVarianceDifferentReturnTypesD(): Invariant<*> = Invariant() + +fun testVarianceDifferentReturnTypesDReverse(): Invariant = Invariant() +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesDReverse(): Invariant<*> = Invariant() + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesE(): Invariant = Invariant() +fun testVarianceDifferentReturnTypesE(): Invariant<*> = Invariant() + +fun testVarianceDifferentReturnTypesEReverse(): Invariant = Invariant() +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesEReverse(): Invariant<*> = Invariant() + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesF(): Invariant = Invariant() +fun testVarianceDifferentReturnTypesF(): Invariant = Invariant() + +fun testVarianceDifferentReturnTypesFReverse(): Invariant = Invariant() +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesFReverse(): Invariant = Invariant() + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeAliasedReturnTypes(): UserKlass = UserKlass() +fun testTypeAliasedReturnTypes(): SameUserKlass = UserKlass() + +fun testTypeAliasedReturnTypesReverse(): UserKlass = UserKlass() +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeAliasedReturnTypesReverse(): SameUserKlass = UserKlass() + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun UserKlass.testIdenticalExtensionReceivers() {} +fun UserKlass.testIdenticalExtensionReceivers() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun UserKlass.testTypeAliasedExtensionReceivers() {} +fun SameUserKlass.testTypeAliasedExtensionReceivers() {} + +fun UserKlass.testTypeAliasedExtensionReceiversReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun SameUserKlass.testTypeAliasedExtensionReceiversReverse() {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testIdenticalValueParameters(arg: UserKlass) {} +fun testIdenticalValueParameters(arg: UserKlass) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferentlyNamedValueParameters(argA: UserKlass) {} +fun testDifferentlyNamedValueParameters(argB: UserKlass) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeAliasedValueParameterTypes(arg: UserKlass) {} +fun testTypeAliasedValueParameterTypes(arg: SameUserKlass) {} + +fun testTypeAliasedValueParameterTypesReverse(arg: UserKlass) {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeAliasedValueParameterTypesReverse(arg: SameUserKlass) {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleIdenticalValueParameters(arg1: UserKlassA, arg2: UserKlassB) {} +fun testMultipleIdenticalValueParameters(arg1: UserKlassA, arg2: UserKlassB) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleDifferentlyNamedValueParametersA(arg1: UserKlassA, arg2A: UserKlassB) {} +fun testMultipleDifferentlyNamedValueParametersA(arg1: UserKlassA, arg2B: UserKlassB) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleDifferentlyNamedValueParametersB(arg1A: UserKlassA, arg2A: UserKlassB) {} +fun testMultipleDifferentlyNamedValueParametersB(arg1B: UserKlassA, arg2B: UserKlassB) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleTypeAliasedValueParameterTypesA(arg1: UserKlassA, arg2: UserKlassB) {} +fun testMultipleTypeAliasedValueParameterTypesA(arg1: UserKlassA, arg2: SameUserKlassB) {} + +fun testMultipleTypeAliasedValueParameterTypesAReverse(arg1: UserKlassA, arg2: UserKlassB) {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleTypeAliasedValueParameterTypesAReverse(arg1: UserKlassA, arg2: SameUserKlassB) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleTypeAliasedValueParameterTypesB(arg1: UserKlassA, arg2: UserKlassB) {} +fun testMultipleTypeAliasedValueParameterTypesB(arg1: SameUserKlassA, arg2: SameUserKlassB) {} + +fun testMultipleTypeAliasedValueParameterTypesBReverse(arg1: UserKlassA, arg2: UserKlassB) {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleTypeAliasedValueParameterTypesBReverse(arg1: SameUserKlassA, arg2: SameUserKlassB) {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testValueParameterWithIdenticalDefaultArguments(arg: UserKlass = defaultArgument) {} +fun testValueParameterWithIdenticalDefaultArguments(arg: UserKlass = defaultArgument) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInValueParameterDefaultArgumentsPresence(arg: UserKlass = defaultArgument) {} +fun testDifferencesInValueParameterDefaultArgumentsPresence(arg: UserKlass) {} + +fun testDifferencesInValueParameterDefaultArgumentsPresenceReverse(arg: UserKlass = defaultArgument) {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInValueParameterDefaultArgumentsPresenceReverse(arg: UserKlass) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testValueParameterWithDifferentDefaultArguments(arg: UserKlass = defaultArgumentA) {} +fun testValueParameterWithDifferentDefaultArguments(arg: UserKlass = defaultArgumentB) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testValueParameterWithAliasedDefaultArguments(arg: UserKlass = defaultArgument) {} +fun testValueParameterWithAliasedDefaultArguments(arg: UserKlass = sameDefaultArgument) {} + +fun testValueParameterWithAliasedDefaultArgumentsReverse(arg: UserKlass = defaultArgument) {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testValueParameterWithAliasedDefaultArgumentsReverse(arg: UserKlass = sameDefaultArgument) {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testIdenticalTypeParametersA() {} +fun testIdenticalTypeParametersA() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testIdenticalTypeParametersB(arg: T) {} +fun testIdenticalTypeParametersB(arg: T) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testIdenticalTypeParametersC(arg: Invariant) {} +fun testIdenticalTypeParametersC(arg: Invariant) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferentlyNamedTypeParametersA() {} +fun testDifferentlyNamedTypeParametersA() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferentlyNamedTypeParametersB(arg: TA) {} +fun testDifferentlyNamedTypeParametersB(arg: TB) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferentlyNamedTypeParametersC(arg: Invariant) {} +fun testDifferentlyNamedTypeParametersC(arg: Invariant) {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleIdenticalTypeParameters() {} +fun testMultipleIdenticalTypeParameters() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleDifferentlyNamedTypeParametersA() {} +fun testMultipleDifferentlyNamedTypeParametersA() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleDifferentlyNamedTypeParametersB() {} +fun testMultipleDifferentlyNamedTypeParametersB() {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithIdenticalUpperBoundsA() {} +fun testTypeParameterWithIdenticalUpperBoundsA() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithIdenticalUpperBoundsB(arg: T) {} +fun testTypeParameterWithIdenticalUpperBoundsB(arg: T) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithIdenticalUpperBoundsC(arg: Invariant) {} +fun testTypeParameterWithIdenticalUpperBoundsC(arg: Invariant) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInTypeParameterUpperBoundsPresence() {} +fun testDifferencesInTypeParameterUpperBoundsPresence() {} + +fun testDifferencesInTypeParameterUpperBoundsPresenceReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInTypeParameterUpperBoundsPresenceReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithDifferentUpperBounds() {} +fun testTypeParameterWithDifferentUpperBounds() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsA() {} +fun > testTypeParameterWithVarianceDifferentUpperBoundsA() {} + +fun > testTypeParameterWithVarianceDifferentUpperBoundsAReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsAReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsB() {} +fun > testTypeParameterWithVarianceDifferentUpperBoundsB() {} + +fun > testTypeParameterWithVarianceDifferentUpperBoundsBReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsBReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsC() {} +fun > testTypeParameterWithVarianceDifferentUpperBoundsC() {} + +fun > testTypeParameterWithVarianceDifferentUpperBoundsCReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsCReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsD() {} +fun > testTypeParameterWithVarianceDifferentUpperBoundsD() {} + +fun > testTypeParameterWithVarianceDifferentUpperBoundsDReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsDReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsE() {} +fun > testTypeParameterWithVarianceDifferentUpperBoundsE() {} + +fun > testTypeParameterWithVarianceDifferentUpperBoundsEReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsEReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsF() {} +fun > testTypeParameterWithVarianceDifferentUpperBoundsF() {} + +fun > testTypeParameterWithVarianceDifferentUpperBoundsFReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsFReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithTypeAliasedUpperBoundsA() {} +fun testTypeParameterWithTypeAliasedUpperBoundsA() {} + +fun testTypeParameterWithTypeAliasedUpperBoundsAReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithTypeAliasedUpperBoundsAReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithTypeAliasedUpperBoundsB(arg: T) {} +fun testTypeParameterWithTypeAliasedUpperBoundsB(arg: T) {} + +fun testTypeParameterWithTypeAliasedUpperBoundsBReverse(arg: T) {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithTypeAliasedUpperBoundsBReverse(arg: T) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithTypeAliasedUpperBoundsC(arg: Invariant) {} +fun testTypeParameterWithTypeAliasedUpperBoundsC(arg: Invariant) {} + +fun testTypeParameterWithTypeAliasedUpperBoundsCReverse(arg: Invariant) {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithTypeAliasedUpperBoundsCReverse(arg: Invariant) {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleIdenticalUpperBoundsAA() where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleIdenticalUpperBoundsAA() where T: UserInterfaceA, T: UserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleIdenticalUpperBoundsAB(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleIdenticalUpperBoundsAB(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleIdenticalUpperBoundsAC(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleIdenticalUpperBoundsAC(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleIdenticalUpperBoundsBA() where T: UserInterfaceB {} +fun testTypeParameterWithMultipleIdenticalUpperBoundsBA() where T: UserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleIdenticalUpperBoundsBB(arg: T) where T: UserInterfaceB {} +fun testTypeParameterWithMultipleIdenticalUpperBoundsBB(arg: T) where T: UserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleIdenticalUpperBoundsBC(arg: Invariant) where T: UserInterfaceB {} +fun testTypeParameterWithMultipleIdenticalUpperBoundsBC(arg: Invariant) where T: UserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInTypeParameterMultipleUpperBoundsPresenceA() where T: UserInterfaceA, T: UserInterfaceB {} +fun testDifferencesInTypeParameterMultipleUpperBoundsPresenceA() where T: UserInterfaceA {} + +fun testDifferencesInTypeParameterMultipleUpperBoundsPresenceB() where T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInTypeParameterMultipleUpperBoundsPresenceB() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleDifferentUpperBoundsAA() where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleDifferentUpperBoundsAA() where T: UserInterfaceA, T: UserInterfaceC {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleDifferentUpperBoundsAB() where T: UserInterfaceB {} +fun testTypeParameterWithMultipleDifferentUpperBoundsAB() where T: UserInterfaceC {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleDifferentUpperBoundsAC() where T: UserInterfaceA {} +fun testTypeParameterWithMultipleDifferentUpperBoundsAC() where T: UserInterfaceA {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleDifferentUpperBoundsBA() where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleDifferentUpperBoundsBA() where T: UserInterfaceC, T: UserInterfaceD {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleDifferentUpperBoundsBB() where T: UserInterfaceB {} +fun testTypeParameterWithMultipleDifferentUpperBoundsBB() where T: UserInterfaceD {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAA() where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAA() where T: UserInterfaceA, T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAAReverse() where T: UserInterfaceA, T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAAReverse() where T: UserInterfaceA, T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAB(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAB(arg: T) where T: UserInterfaceA, T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAABReverse(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAABReverse(arg: T) where T: UserInterfaceA, T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAC(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAC(arg: Invariant) where T: UserInterfaceA, T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAACReverse(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAACReverse(arg: Invariant) where T: UserInterfaceA, T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABA() where T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABA() where T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABAReverse() where T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABAReverse() where T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABB(arg: T) where T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABB(arg: T) where T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABBReverse(arg: T) where T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABBReverse(arg: T) where T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABC(arg: Invariant) where T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABC(arg: Invariant) where T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABCReverse(arg: Invariant) where T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABCReverse(arg: Invariant) where T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACA() where T: UserInterfaceA {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACA() where T: UserInterfaceA {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACAReverse() where T: UserInterfaceA {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACAReverse() where T: UserInterfaceA {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACB(arg: T) where T: UserInterfaceA {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACB(arg: T) where T: UserInterfaceA {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACBReverse(arg: T) where T: UserInterfaceA {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACBReverse(arg: T) where T: UserInterfaceA {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACC(arg: Invariant) where T: UserInterfaceA {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACC(arg: Invariant) where T: UserInterfaceA {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACCReverse(arg: Invariant) where T: UserInterfaceA {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACCReverse(arg: Invariant) where T: UserInterfaceA {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAA() where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAA() where T: SameUserInterfaceA, T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAAReverse() where T: UserInterfaceA, T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAAReverse() where T: SameUserInterfaceA, T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAB(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAB(arg: T) where T: SameUserInterfaceA, T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBABReverse(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBABReverse(arg: T) where T: SameUserInterfaceA, T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAC(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAC(arg: Invariant) where T: SameUserInterfaceA, T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBACReverse(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBACReverse(arg: Invariant) where T: SameUserInterfaceA, T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBA() where T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBA() where T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBAReverse() where T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBAReverse() where T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBB(arg: T) where T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBB(arg: T) where T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBBReverse(arg: T) where T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBBReverse(arg: T) where T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBC(arg: Invariant) where T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBC(arg: Invariant) where T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBCReverse(arg: Invariant) where T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBCReverse(arg: Invariant) where T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleShuffledUpperBoundsAA() where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleShuffledUpperBoundsAA() where T: UserInterfaceB, T: UserInterfaceA {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleShuffledUpperBoundsAB(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleShuffledUpperBoundsAB(arg: T) where T: UserInterfaceB, T: UserInterfaceA {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleShuffledUpperBoundsAC(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleShuffledUpperBoundsAC(arg: Invariant) where T: UserInterfaceB, T: UserInterfaceA {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleShuffledUpperBoundsBA() where T: UserInterfaceB {} +fun testTypeParameterWithMultipleShuffledUpperBoundsBA() where T: UserInterfaceA {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleShuffledUpperBoundsBB(arg: T) where T: UserInterfaceB {} +fun testTypeParameterWithMultipleShuffledUpperBoundsBB(arg: T) where T: UserInterfaceA {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleShuffledUpperBoundsBC(arg: Invariant) where T: UserInterfaceB {} +fun testTypeParameterWithMultipleShuffledUpperBoundsBC(arg: Invariant) where T: UserInterfaceA {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testIdenticalReifiedTypeParameterA() {} +inline fun testIdenticalReifiedTypeParameterA() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testIdenticalReifiedTypeParameterB(arg: T) {} +inline fun testIdenticalReifiedTypeParameterB(arg: T) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testIdenticalReifiedTypeParameterC(arg: Invariant) {} +inline fun testIdenticalReifiedTypeParameterC(arg: Invariant) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testDifferencesInReifiedBehaviorOfTypeParameterA() {} +inline fun testDifferencesInReifiedBehaviorOfTypeParameterA() {} + +inline fun testDifferencesInReifiedBehaviorOfTypeParameterAReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testDifferencesInReifiedBehaviorOfTypeParameterAReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testDifferencesInReifiedBehaviorOfTypeParameterB(arg: T) {} +inline fun testDifferencesInReifiedBehaviorOfTypeParameterB(arg: T) {} + +inline fun testDifferencesInReifiedBehaviorOfTypeParameterBReverse(arg: T) {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testDifferencesInReifiedBehaviorOfTypeParameterBReverse(arg: T) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testDifferencesInReifiedBehaviorOfTypeParameterC(arg: Invariant) {} +inline fun testDifferencesInReifiedBehaviorOfTypeParameterC(arg: Invariant) {} + +inline fun testDifferencesInReifiedBehaviorOfTypeParameterCReverse(arg: Invariant) {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testDifferencesInReifiedBehaviorOfTypeParameterCReverse(arg: Invariant) {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testIdenticalPresenceOfInlineModifier() {} +inline fun testIdenticalPresenceOfInlineModifier() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testDifferencesInInlineModifierPresence() {} +fun testDifferencesInInlineModifierPresence() {} + +inline fun testDifferencesInInlineModifierPresenceReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInInlineModifierPresenceReverse() {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) infix fun UserKlass.testIdenticalPresenceOfInfixModifier(arg: UserKlass) {} +infix fun UserKlass.testIdenticalPresenceOfInfixModifier(arg: UserKlass) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) infix fun UserKlass.testDifferencesInInfixModifierPresence(arg: UserKlass) {} +fun UserKlass.testDifferencesInInfixModifierPresence(arg: UserKlass) {} + +infix fun UserKlass.testDifferencesInInfixModifierPresenceReverse(arg: UserKlass) {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun UserKlass.testDifferencesInInfixModifierPresenceReverse(arg: UserKlass) {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) operator fun UserKlassA.unaryPlus() {} +operator fun UserKlassA.unaryPlus() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) operator fun UserKlassB.unaryPlus() {} +fun UserKlassB.unaryPlus() {} + +operator fun UserKlassB.unaryMinus() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun UserKlassB.unaryMinus() {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) tailrec fun testIdenticalPresenceOfTailrecModifier() {} +tailrec fun testIdenticalPresenceOfTailrecModifier() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) tailrec fun testDifferencesInTailrecModifierPresence() {} +fun testDifferencesInTailrecModifierPresence() {} + +tailrec fun testDifferencesInTailrecModifierPresenceReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInTailrecModifierPresenceReverse() {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) private fun testIdenticalPrivateVisibility() {} +private fun testIdenticalPrivateVisibility() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal fun testIdenticalInternalVisibility() {} +internal fun testIdenticalInternalVisibility() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) private fun testDifferencesInPrivateAndPublicVisibilities() {} +public fun testDifferencesInPrivateAndPublicVisibilities() {} + +private fun testDifferencesInPrivateAndPublicVisibilitiesReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) public fun testDifferencesInPrivateAndPublicVisibilitiesReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal fun testDifferencesInInternalAndPublicVisibilities() {} +public fun testDifferencesInInternalAndPublicVisibilities() {} + +internal fun testDifferencesInInternalAndPublicVisibilitiesReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) public fun testDifferencesInInternalAndPublicVisibilitiesReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) private fun testDifferencesInPrivateAndInternalVisibilities() {} +internal fun testDifferencesInPrivateAndInternalVisibilities() {} + +private fun testDifferencesInPrivateAndInternalVisibilitiesReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal fun testDifferencesInPrivateAndInternalVisibilitiesReverse() {} + + +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/FunctionsOnTopLevel.kt b/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/FunctionsOnTopLevel.kt new file mode 100644 index 00000000000..d31c035abd0 --- /dev/null +++ b/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/FunctionsOnTopLevel.kt @@ -0,0 +1,494 @@ +// DIAGNOSTICS: -MISPLACED_TYPE_PARAMETER_CONSTRAINTS, -NOTHING_TO_INLINE, -NO_TAIL_CALLS_FOUND + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testBasic() {} +fun testBasic() {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testIdenticalReturnTypes(): UserKlass = UserKlass() +fun testIdenticalReturnTypes(): UserKlass = UserKlass() + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInReturnTypePresence(): Unit {} +fun testDifferencesInReturnTypePresence() {} + +fun testDifferencesInReturnTypePresenceReverse(): Unit {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInReturnTypePresenceReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferentReturnTypes(): UserKlassA = UserKlassA() +fun testDifferentReturnTypes(): UserKlassB = UserKlassB() + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesA(): Invariant = Invariant() +fun testVarianceDifferentReturnTypesA(): Invariant = Invariant() + +fun testVarianceDifferentReturnTypesAReverse(): Invariant = Invariant() +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesAReverse(): Invariant = Invariant() + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesB(): Invariant = Invariant() +fun testVarianceDifferentReturnTypesB(): Invariant = Invariant() + +fun testVarianceDifferentReturnTypesBReverse(): Invariant = Invariant() +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesBReverse(): Invariant = Invariant() + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesC(): Invariant = Invariant() +fun testVarianceDifferentReturnTypesC(): Invariant<*> = Invariant() + +fun testVarianceDifferentReturnTypesCReverse(): Invariant = Invariant() +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesCReverse(): Invariant<*> = Invariant() + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesD(): Invariant = Invariant() +fun testVarianceDifferentReturnTypesD(): Invariant<*> = Invariant() + +fun testVarianceDifferentReturnTypesDReverse(): Invariant = Invariant() +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesDReverse(): Invariant<*> = Invariant() + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesE(): Invariant = Invariant() +fun testVarianceDifferentReturnTypesE(): Invariant<*> = Invariant() + +fun testVarianceDifferentReturnTypesEReverse(): Invariant = Invariant() +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesEReverse(): Invariant<*> = Invariant() + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesF(): Invariant = Invariant() +fun testVarianceDifferentReturnTypesF(): Invariant = Invariant() + +fun testVarianceDifferentReturnTypesFReverse(): Invariant = Invariant() +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testVarianceDifferentReturnTypesFReverse(): Invariant = Invariant() + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeAliasedReturnTypes(): UserKlass = UserKlass() +fun testTypeAliasedReturnTypes(): SameUserKlass = UserKlass() + +fun testTypeAliasedReturnTypesReverse(): UserKlass = UserKlass() +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeAliasedReturnTypesReverse(): SameUserKlass = UserKlass() + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun UserKlass.testIdenticalExtensionReceivers() {} +fun UserKlass.testIdenticalExtensionReceivers() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun UserKlass.testTypeAliasedExtensionReceivers() {} +fun SameUserKlass.testTypeAliasedExtensionReceivers() {} + +fun UserKlass.testTypeAliasedExtensionReceiversReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun SameUserKlass.testTypeAliasedExtensionReceiversReverse() {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testIdenticalValueParameters(arg: UserKlass) {} +fun testIdenticalValueParameters(arg: UserKlass) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferentlyNamedValueParameters(argA: UserKlass) {} +fun testDifferentlyNamedValueParameters(argB: UserKlass) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeAliasedValueParameterTypes(arg: UserKlass) {} +fun testTypeAliasedValueParameterTypes(arg: SameUserKlass) {} + +fun testTypeAliasedValueParameterTypesReverse(arg: UserKlass) {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeAliasedValueParameterTypesReverse(arg: SameUserKlass) {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleIdenticalValueParameters(arg1: UserKlassA, arg2: UserKlassB) {} +fun testMultipleIdenticalValueParameters(arg1: UserKlassA, arg2: UserKlassB) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleDifferentlyNamedValueParametersA(arg1: UserKlassA, arg2A: UserKlassB) {} +fun testMultipleDifferentlyNamedValueParametersA(arg1: UserKlassA, arg2B: UserKlassB) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleDifferentlyNamedValueParametersB(arg1A: UserKlassA, arg2A: UserKlassB) {} +fun testMultipleDifferentlyNamedValueParametersB(arg1B: UserKlassA, arg2B: UserKlassB) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleTypeAliasedValueParameterTypesA(arg1: UserKlassA, arg2: UserKlassB) {} +fun testMultipleTypeAliasedValueParameterTypesA(arg1: UserKlassA, arg2: SameUserKlassB) {} + +fun testMultipleTypeAliasedValueParameterTypesAReverse(arg1: UserKlassA, arg2: UserKlassB) {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleTypeAliasedValueParameterTypesAReverse(arg1: UserKlassA, arg2: SameUserKlassB) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleTypeAliasedValueParameterTypesB(arg1: UserKlassA, arg2: UserKlassB) {} +fun testMultipleTypeAliasedValueParameterTypesB(arg1: SameUserKlassA, arg2: SameUserKlassB) {} + +fun testMultipleTypeAliasedValueParameterTypesBReverse(arg1: UserKlassA, arg2: UserKlassB) {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleTypeAliasedValueParameterTypesBReverse(arg1: SameUserKlassA, arg2: SameUserKlassB) {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testValueParameterWithIdenticalDefaultArguments(arg: UserKlass = defaultArgument) {} +fun testValueParameterWithIdenticalDefaultArguments(arg: UserKlass = defaultArgument) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInValueParameterDefaultArgumentsPresence(arg: UserKlass = defaultArgument) {} +fun testDifferencesInValueParameterDefaultArgumentsPresence(arg: UserKlass) {} + +fun testDifferencesInValueParameterDefaultArgumentsPresenceReverse(arg: UserKlass = defaultArgument) {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInValueParameterDefaultArgumentsPresenceReverse(arg: UserKlass) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testValueParameterWithDifferentDefaultArguments(arg: UserKlass = defaultArgumentA) {} +fun testValueParameterWithDifferentDefaultArguments(arg: UserKlass = defaultArgumentB) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testValueParameterWithAliasedDefaultArguments(arg: UserKlass = defaultArgument) {} +fun testValueParameterWithAliasedDefaultArguments(arg: UserKlass = sameDefaultArgument) {} + +fun testValueParameterWithAliasedDefaultArgumentsReverse(arg: UserKlass = defaultArgument) {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testValueParameterWithAliasedDefaultArgumentsReverse(arg: UserKlass = sameDefaultArgument) {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testIdenticalTypeParametersA() {} +fun testIdenticalTypeParametersA() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testIdenticalTypeParametersB(arg: T) {} +fun testIdenticalTypeParametersB(arg: T) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testIdenticalTypeParametersC(arg: Invariant) {} +fun testIdenticalTypeParametersC(arg: Invariant) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferentlyNamedTypeParametersA() {} +fun testDifferentlyNamedTypeParametersA() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferentlyNamedTypeParametersB(arg: TA) {} +fun testDifferentlyNamedTypeParametersB(arg: TB) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferentlyNamedTypeParametersC(arg: Invariant) {} +fun testDifferentlyNamedTypeParametersC(arg: Invariant) {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleIdenticalTypeParameters() {} +fun testMultipleIdenticalTypeParameters() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleDifferentlyNamedTypeParametersA() {} +fun testMultipleDifferentlyNamedTypeParametersA() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testMultipleDifferentlyNamedTypeParametersB() {} +fun testMultipleDifferentlyNamedTypeParametersB() {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithIdenticalUpperBoundsA() {} +fun testTypeParameterWithIdenticalUpperBoundsA() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithIdenticalUpperBoundsB(arg: T) {} +fun testTypeParameterWithIdenticalUpperBoundsB(arg: T) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithIdenticalUpperBoundsC(arg: Invariant) {} +fun testTypeParameterWithIdenticalUpperBoundsC(arg: Invariant) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInTypeParameterUpperBoundsPresence() {} +fun testDifferencesInTypeParameterUpperBoundsPresence() {} + +fun testDifferencesInTypeParameterUpperBoundsPresenceReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInTypeParameterUpperBoundsPresenceReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithDifferentUpperBounds() {} +fun testTypeParameterWithDifferentUpperBounds() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsA() {} +fun > testTypeParameterWithVarianceDifferentUpperBoundsA() {} + +fun > testTypeParameterWithVarianceDifferentUpperBoundsAReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsAReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsB() {} +fun > testTypeParameterWithVarianceDifferentUpperBoundsB() {} + +fun > testTypeParameterWithVarianceDifferentUpperBoundsBReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsBReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsC() {} +fun > testTypeParameterWithVarianceDifferentUpperBoundsC() {} + +fun > testTypeParameterWithVarianceDifferentUpperBoundsCReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsCReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsD() {} +fun > testTypeParameterWithVarianceDifferentUpperBoundsD() {} + +fun > testTypeParameterWithVarianceDifferentUpperBoundsDReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsDReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsE() {} +fun > testTypeParameterWithVarianceDifferentUpperBoundsE() {} + +fun > testTypeParameterWithVarianceDifferentUpperBoundsEReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsEReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsF() {} +fun > testTypeParameterWithVarianceDifferentUpperBoundsF() {} + +fun > testTypeParameterWithVarianceDifferentUpperBoundsFReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun > testTypeParameterWithVarianceDifferentUpperBoundsFReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithTypeAliasedUpperBoundsA() {} +fun testTypeParameterWithTypeAliasedUpperBoundsA() {} + +fun testTypeParameterWithTypeAliasedUpperBoundsAReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithTypeAliasedUpperBoundsAReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithTypeAliasedUpperBoundsB(arg: T) {} +fun testTypeParameterWithTypeAliasedUpperBoundsB(arg: T) {} + +fun testTypeParameterWithTypeAliasedUpperBoundsBReverse(arg: T) {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithTypeAliasedUpperBoundsBReverse(arg: T) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithTypeAliasedUpperBoundsC(arg: Invariant) {} +fun testTypeParameterWithTypeAliasedUpperBoundsC(arg: Invariant) {} + +fun testTypeParameterWithTypeAliasedUpperBoundsCReverse(arg: Invariant) {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithTypeAliasedUpperBoundsCReverse(arg: Invariant) {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleIdenticalUpperBoundsAA() where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleIdenticalUpperBoundsAA() where T: UserInterfaceA, T: UserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleIdenticalUpperBoundsAB(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleIdenticalUpperBoundsAB(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleIdenticalUpperBoundsAC(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleIdenticalUpperBoundsAC(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleIdenticalUpperBoundsBA() where T: UserInterfaceB {} +fun testTypeParameterWithMultipleIdenticalUpperBoundsBA() where T: UserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleIdenticalUpperBoundsBB(arg: T) where T: UserInterfaceB {} +fun testTypeParameterWithMultipleIdenticalUpperBoundsBB(arg: T) where T: UserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleIdenticalUpperBoundsBC(arg: Invariant) where T: UserInterfaceB {} +fun testTypeParameterWithMultipleIdenticalUpperBoundsBC(arg: Invariant) where T: UserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInTypeParameterMultipleUpperBoundsPresenceA() where T: UserInterfaceA, T: UserInterfaceB {} +fun testDifferencesInTypeParameterMultipleUpperBoundsPresenceA() where T: UserInterfaceA {} + +fun testDifferencesInTypeParameterMultipleUpperBoundsPresenceB() where T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInTypeParameterMultipleUpperBoundsPresenceB() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleDifferentUpperBoundsAA() where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleDifferentUpperBoundsAA() where T: UserInterfaceA, T: UserInterfaceC {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleDifferentUpperBoundsAB() where T: UserInterfaceB {} +fun testTypeParameterWithMultipleDifferentUpperBoundsAB() where T: UserInterfaceC {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleDifferentUpperBoundsAC() where T: UserInterfaceA {} +fun testTypeParameterWithMultipleDifferentUpperBoundsAC() where T: UserInterfaceA {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleDifferentUpperBoundsBA() where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleDifferentUpperBoundsBA() where T: UserInterfaceC, T: UserInterfaceD {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleDifferentUpperBoundsBB() where T: UserInterfaceB {} +fun testTypeParameterWithMultipleDifferentUpperBoundsBB() where T: UserInterfaceD {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAA() where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAA() where T: UserInterfaceA, T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAAReverse() where T: UserInterfaceA, T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAAReverse() where T: UserInterfaceA, T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAB(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAB(arg: T) where T: UserInterfaceA, T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAABReverse(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAABReverse(arg: T) where T: UserInterfaceA, T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAC(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAAC(arg: Invariant) where T: UserInterfaceA, T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAACReverse(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsAACReverse(arg: Invariant) where T: UserInterfaceA, T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABA() where T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABA() where T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABAReverse() where T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABAReverse() where T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABB(arg: T) where T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABB(arg: T) where T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABBReverse(arg: T) where T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABBReverse(arg: T) where T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABC(arg: Invariant) where T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABC(arg: Invariant) where T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABCReverse(arg: Invariant) where T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsABCReverse(arg: Invariant) where T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACA() where T: UserInterfaceA {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACA() where T: UserInterfaceA {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACAReverse() where T: UserInterfaceA {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACAReverse() where T: UserInterfaceA {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACB(arg: T) where T: UserInterfaceA {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACB(arg: T) where T: UserInterfaceA {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACBReverse(arg: T) where T: UserInterfaceA {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACBReverse(arg: T) where T: UserInterfaceA {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACC(arg: Invariant) where T: UserInterfaceA {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACC(arg: Invariant) where T: UserInterfaceA {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACCReverse(arg: Invariant) where T: UserInterfaceA {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsACCReverse(arg: Invariant) where T: UserInterfaceA {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAA() where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAA() where T: SameUserInterfaceA, T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAAReverse() where T: UserInterfaceA, T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAAReverse() where T: SameUserInterfaceA, T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAB(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAB(arg: T) where T: SameUserInterfaceA, T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBABReverse(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBABReverse(arg: T) where T: SameUserInterfaceA, T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAC(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBAC(arg: Invariant) where T: SameUserInterfaceA, T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBACReverse(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBACReverse(arg: Invariant) where T: SameUserInterfaceA, T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBA() where T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBA() where T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBAReverse() where T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBAReverse() where T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBB(arg: T) where T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBB(arg: T) where T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBBReverse(arg: T) where T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBBReverse(arg: T) where T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBC(arg: Invariant) where T: UserInterfaceB {} +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBC(arg: Invariant) where T: SameUserInterfaceB {} + +fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBCReverse(arg: Invariant) where T: UserInterfaceB {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleTypeAliasedUpperBoundsBBCReverse(arg: Invariant) where T: SameUserInterfaceB {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleShuffledUpperBoundsAA() where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleShuffledUpperBoundsAA() where T: UserInterfaceB, T: UserInterfaceA {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleShuffledUpperBoundsAB(arg: T) where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleShuffledUpperBoundsAB(arg: T) where T: UserInterfaceB, T: UserInterfaceA {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleShuffledUpperBoundsAC(arg: Invariant) where T: UserInterfaceA, T: UserInterfaceB {} +fun testTypeParameterWithMultipleShuffledUpperBoundsAC(arg: Invariant) where T: UserInterfaceB, T: UserInterfaceA {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleShuffledUpperBoundsBA() where T: UserInterfaceB {} +fun testTypeParameterWithMultipleShuffledUpperBoundsBA() where T: UserInterfaceA {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleShuffledUpperBoundsBB(arg: T) where T: UserInterfaceB {} +fun testTypeParameterWithMultipleShuffledUpperBoundsBB(arg: T) where T: UserInterfaceA {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testTypeParameterWithMultipleShuffledUpperBoundsBC(arg: Invariant) where T: UserInterfaceB {} +fun testTypeParameterWithMultipleShuffledUpperBoundsBC(arg: Invariant) where T: UserInterfaceA {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testIdenticalReifiedTypeParameterA() {} +inline fun testIdenticalReifiedTypeParameterA() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testIdenticalReifiedTypeParameterB(arg: T) {} +inline fun testIdenticalReifiedTypeParameterB(arg: T) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testIdenticalReifiedTypeParameterC(arg: Invariant) {} +inline fun testIdenticalReifiedTypeParameterC(arg: Invariant) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testDifferencesInReifiedBehaviorOfTypeParameterA() {} +inline fun testDifferencesInReifiedBehaviorOfTypeParameterA() {} + +inline fun testDifferencesInReifiedBehaviorOfTypeParameterAReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testDifferencesInReifiedBehaviorOfTypeParameterAReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testDifferencesInReifiedBehaviorOfTypeParameterB(arg: T) {} +inline fun testDifferencesInReifiedBehaviorOfTypeParameterB(arg: T) {} + +inline fun testDifferencesInReifiedBehaviorOfTypeParameterBReverse(arg: T) {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testDifferencesInReifiedBehaviorOfTypeParameterBReverse(arg: T) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testDifferencesInReifiedBehaviorOfTypeParameterC(arg: Invariant) {} +inline fun testDifferencesInReifiedBehaviorOfTypeParameterC(arg: Invariant) {} + +inline fun testDifferencesInReifiedBehaviorOfTypeParameterCReverse(arg: Invariant) {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testDifferencesInReifiedBehaviorOfTypeParameterCReverse(arg: Invariant) {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testIdenticalPresenceOfInlineModifier() {} +inline fun testIdenticalPresenceOfInlineModifier() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) inline fun testDifferencesInInlineModifierPresence() {} +fun testDifferencesInInlineModifierPresence() {} + +inline fun testDifferencesInInlineModifierPresenceReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInInlineModifierPresenceReverse() {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) infix fun UserKlass.testIdenticalPresenceOfInfixModifier(arg: UserKlass) {} +infix fun UserKlass.testIdenticalPresenceOfInfixModifier(arg: UserKlass) {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) infix fun UserKlass.testDifferencesInInfixModifierPresence(arg: UserKlass) {} +fun UserKlass.testDifferencesInInfixModifierPresence(arg: UserKlass) {} + +infix fun UserKlass.testDifferencesInInfixModifierPresenceReverse(arg: UserKlass) {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun UserKlass.testDifferencesInInfixModifierPresenceReverse(arg: UserKlass) {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) operator fun UserKlassA.unaryPlus() {} +operator fun UserKlassA.unaryPlus() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) operator fun UserKlassB.unaryPlus() {} +fun UserKlassB.unaryPlus() {} + +operator fun UserKlassB.unaryMinus() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun UserKlassB.unaryMinus() {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) tailrec fun testIdenticalPresenceOfTailrecModifier() {} +tailrec fun testIdenticalPresenceOfTailrecModifier() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) tailrec fun testDifferencesInTailrecModifierPresence() {} +fun testDifferencesInTailrecModifierPresence() {} + +tailrec fun testDifferencesInTailrecModifierPresenceReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun testDifferencesInTailrecModifierPresenceReverse() {} + + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) private fun testIdenticalPrivateVisibility() {} +private fun testIdenticalPrivateVisibility() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal fun testIdenticalInternalVisibility() {} +internal fun testIdenticalInternalVisibility() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) private fun testDifferencesInPrivateAndPublicVisibilities() {} +public fun testDifferencesInPrivateAndPublicVisibilities() {} + +private fun testDifferencesInPrivateAndPublicVisibilitiesReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) public fun testDifferencesInPrivateAndPublicVisibilitiesReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal fun testDifferencesInInternalAndPublicVisibilities() {} +public fun testDifferencesInInternalAndPublicVisibilities() {} + +internal fun testDifferencesInInternalAndPublicVisibilitiesReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) public fun testDifferencesInInternalAndPublicVisibilitiesReverse() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) private fun testDifferencesInPrivateAndInternalVisibilities() {} +internal fun testDifferencesInPrivateAndInternalVisibilities() {} + +private fun testDifferencesInPrivateAndInternalVisibilitiesReverse() {} +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) internal fun testDifferencesInPrivateAndInternalVisibilitiesReverse() {} + + +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/NoHiddenTransitivityFromClassifierToConstructor.kt b/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/NoHiddenTransitivityFromClassifierToConstructor.kt new file mode 100644 index 00000000000..55a959055c3 --- /dev/null +++ b/compiler/testData/diagnostics/tests/overload/noConflictingOverloadsWithDeprecatedHidden/NoHiddenTransitivityFromClassifierToConstructor.kt @@ -0,0 +1,19 @@ +// FIR_IDENTICAL + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) +class KlassA +fun KlassA() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) +class KlassB() +fun KlassB() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) +class KlassC constructor() +fun KlassC() {} + +@Deprecated(message = "", level = DeprecationLevel.HIDDEN) +class KlassD { + constructor() +} +fun KlassD() {}