From 678b76cab16349b43bd2e7acb24f839ef6e0d925 Mon Sep 17 00:00:00 2001 From: Mikhail Zarechenskiy Date: Mon, 13 Jul 2020 01:42:19 +0300 Subject: [PATCH] Fix presence of `Deprecated` hidden annotation for reference arguments #KT-40234 Fixed --- ...irOldFrontendDiagnosticsTestGenerated.java | 10 +++++++ .../KotlinResolutionStatelessCallbacksImpl.kt | 12 +++++++++ .../deprecation/DeprecationResolver.kt | 13 ++++++++-- .../components/CallableReferenceResolution.kt | 19 ++++++++++---- .../components/CallableReferenceResolver.kt | 9 ++++--- .../calls/components/ExternalComponents.kt | 4 +++ .../components/PostponedArgumentsAnalyzer.kt | 2 +- .../calls/components/ResolutionParts.kt | 2 +- ...edHiddenOnCallableReferenceArgument.fir.kt | 23 ++++++++++++++++ ...ecatedHiddenOnCallableReferenceArgument.kt | 23 ++++++++++++++++ ...catedHiddenOnCallableReferenceArgument.txt | 19 ++++++++++++++ ...inceKotlinHiddenOnReferenceArgument.fir.kt | 26 +++++++++++++++++++ ...tedSinceKotlinHiddenOnReferenceArgument.kt | 26 +++++++++++++++++++ ...edSinceKotlinHiddenOnReferenceArgument.txt | 22 ++++++++++++++++ .../checkers/DiagnosticsTestGenerated.java | 10 +++++++ .../DiagnosticsUsingJavacTestGenerated.java | 10 +++++++ 16 files changed, 217 insertions(+), 13 deletions(-) create mode 100644 compiler/testData/diagnostics/tests/deprecated/deprecatedHiddenOnCallableReferenceArgument.fir.kt create mode 100644 compiler/testData/diagnostics/tests/deprecated/deprecatedHiddenOnCallableReferenceArgument.kt create mode 100644 compiler/testData/diagnostics/tests/deprecated/deprecatedHiddenOnCallableReferenceArgument.txt create mode 100644 compiler/testData/diagnostics/tests/deprecated/deprecatedSinceKotlin/deprecatedSinceKotlinHiddenOnReferenceArgument.fir.kt create mode 100644 compiler/testData/diagnostics/tests/deprecated/deprecatedSinceKotlin/deprecatedSinceKotlinHiddenOnReferenceArgument.kt create mode 100644 compiler/testData/diagnostics/tests/deprecated/deprecatedSinceKotlin/deprecatedSinceKotlinHiddenOnReferenceArgument.txt diff --git a/compiler/fir/analysis-tests/tests/org/jetbrains/kotlin/fir/FirOldFrontendDiagnosticsTestGenerated.java b/compiler/fir/analysis-tests/tests/org/jetbrains/kotlin/fir/FirOldFrontendDiagnosticsTestGenerated.java index 6f52d40dcd4..8ad1fa26545 100644 --- a/compiler/fir/analysis-tests/tests/org/jetbrains/kotlin/fir/FirOldFrontendDiagnosticsTestGenerated.java +++ b/compiler/fir/analysis-tests/tests/org/jetbrains/kotlin/fir/FirOldFrontendDiagnosticsTestGenerated.java @@ -6535,6 +6535,11 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirOldFronte runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedHidden.kt"); } + @TestMetadata("deprecatedHiddenOnCallableReferenceArgument.kt") + public void testDeprecatedHiddenOnCallableReferenceArgument() throws Exception { + runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedHiddenOnCallableReferenceArgument.kt"); + } + @TestMetadata("deprecatedInheritance.kt") public void testDeprecatedInheritance() throws Exception { runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedInheritance.kt"); @@ -6677,6 +6682,11 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirOldFronte runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedSinceKotlin/deprecatedSinceKotlinDeclaration.kt"); } + @TestMetadata("deprecatedSinceKotlinHiddenOnReferenceArgument.kt") + public void testDeprecatedSinceKotlinHiddenOnReferenceArgument() throws Exception { + runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedSinceKotlin/deprecatedSinceKotlinHiddenOnReferenceArgument.kt"); + } + @TestMetadata("deprecatedSinceKotlinOutsideKotlinPackage.kt") public void testDeprecatedSinceKotlinOutsideKotlinPackage() throws Exception { runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedSinceKotlin/deprecatedSinceKotlinOutsideKotlinPackage.kt"); diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/tower/KotlinResolutionStatelessCallbacksImpl.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/tower/KotlinResolutionStatelessCallbacksImpl.kt index 6b911c0f499..74207c411d7 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/tower/KotlinResolutionStatelessCallbacksImpl.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/tower/KotlinResolutionStatelessCallbacksImpl.kt @@ -70,6 +70,18 @@ class KotlinResolutionStatelessCallbacksImpl( kotlinCall is PSIKotlinCallImpl && kotlinCall.psiCall.isCallWithSuperReceiver(), ) + override fun isHiddenInResolution( + descriptor: DeclarationDescriptor, + kotlinCallArgument: KotlinCallArgument, + resolutionCallbacks: KotlinResolutionCallbacks + ): Boolean = + deprecationResolver.isHiddenInResolution( + descriptor, + kotlinCallArgument.psiCallArgument.psiExpression, + (resolutionCallbacks as? KotlinResolutionCallbacksImpl)?.trace?.bindingContext, + isSuperCall = false, + ) + override fun isSuperExpression(receiver: SimpleKotlinCallArgument?): Boolean = receiver?.psiExpression is KtSuperExpression diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/deprecation/DeprecationResolver.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/deprecation/DeprecationResolver.kt index da30270f106..dd98403aaa4 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/deprecation/DeprecationResolver.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/deprecation/DeprecationResolver.kt @@ -16,6 +16,7 @@ import org.jetbrains.kotlin.descriptors.impl.TypeAliasConstructorDescriptor import org.jetbrains.kotlin.metadata.ProtoBuf import org.jetbrains.kotlin.name.FqName import org.jetbrains.kotlin.psi.Call +import org.jetbrains.kotlin.psi.KtElement import org.jetbrains.kotlin.resolve.BindingContext import org.jetbrains.kotlin.resolve.SinceKotlinAccessibility import org.jetbrains.kotlin.resolve.calls.checkers.isOperatorMod @@ -64,6 +65,14 @@ class DeprecationResolver( call: Call? = null, bindingContext: BindingContext? = null, isSuperCall: Boolean = false + ): Boolean = + isHiddenInResolution(descriptor, call?.callElement, bindingContext, isSuperCall) + + fun isHiddenInResolution( + descriptor: DeclarationDescriptor, + callElement: KtElement?, + bindingContext: BindingContext?, + isSuperCall: Boolean ): Boolean { if (descriptor is FunctionDescriptor) { if (descriptor.isHiddenToOvercomeSignatureClash) return true @@ -74,10 +83,10 @@ class DeprecationResolver( if (sinceKotlinAccessibility is SinceKotlinAccessibility.NotAccessible) return true if (sinceKotlinAccessibility is SinceKotlinAccessibility.NotAccessibleButWasExperimental) { - if (call != null && bindingContext != null) { + if (callElement != null && bindingContext != null) { return with(ExperimentalUsageChecker) { sinceKotlinAccessibility.markerClasses.any { classDescriptor -> - !call.callElement.isExperimentalityAccepted(classDescriptor.fqNameSafe, languageVersionSettings, bindingContext) + !callElement.isExperimentalityAccepted(classDescriptor.fqNameSafe, languageVersionSettings, bindingContext) } } } diff --git a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/CallableReferenceResolution.kt b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/CallableReferenceResolution.kt index 4ebc6e3eb53..56a1d5a0118 100644 --- a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/CallableReferenceResolution.kt +++ b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/CallableReferenceResolution.kt @@ -186,7 +186,8 @@ class CallableReferencesCandidateFactory( val scopeTower: ImplicitScopeTower, val compatibilityChecker: ((ConstraintSystemOperation) -> Unit) -> Unit, val expectedType: UnwrappedType?, - private val csBuilder: ConstraintSystemOperation + private val csBuilder: ConstraintSystemOperation, + private val resolutionCallbacks: KotlinResolutionCallbacks ) : CandidateFactory { fun createCallableProcessor(explicitReceiver: DetailedReceiver?) = @@ -212,6 +213,17 @@ class CallableReferencesCandidateFactory( callComponents.builtIns ) + fun createReferenceCandidate(): CallableReferenceCandidate = + CallableReferenceCandidate( + candidateDescriptor, dispatchCallableReceiver, extensionCallableReceiver, + explicitReceiverKind, reflectionCandidateType, callableReferenceAdaptation, diagnostics + ) + + if (callComponents.statelessCallbacks.isHiddenInResolution(candidateDescriptor, argument, resolutionCallbacks)) { + diagnostics.add(HiddenDescriptor) + return createReferenceCandidate() + } + if (needCompatibilityResolveForCallableReference(callableReferenceAdaptation, candidateDescriptor)) { markCandidateForCompatibilityResolve(diagnostics) } @@ -254,10 +266,7 @@ class CallableReferencesCandidateFactory( ) } - return CallableReferenceCandidate( - candidateDescriptor, dispatchCallableReceiver, extensionCallableReceiver, - explicitReceiverKind, reflectionCandidateType, callableReferenceAdaptation, diagnostics - ) + return createReferenceCandidate() } private fun needCompatibilityResolveForCallableReference( diff --git a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/CallableReferenceResolver.kt b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/CallableReferenceResolver.kt index 809b2223de8..73c45f5a653 100644 --- a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/CallableReferenceResolver.kt +++ b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/CallableReferenceResolver.kt @@ -23,7 +23,6 @@ import org.jetbrains.kotlin.resolve.calls.inference.ConstraintSystemBuilder import org.jetbrains.kotlin.resolve.calls.inference.ConstraintSystemOperation import org.jetbrains.kotlin.resolve.calls.inference.components.ConstraintInjector import org.jetbrains.kotlin.resolve.calls.inference.components.NewTypeSubstitutor -import org.jetbrains.kotlin.resolve.calls.inference.model.LowerPriorityToPreserveCompatibility import org.jetbrains.kotlin.resolve.calls.model.* import org.jetbrains.kotlin.resolve.calls.results.FlatSignature import org.jetbrains.kotlin.resolve.calls.results.OverloadingConflictResolver @@ -76,13 +75,14 @@ class CallableReferenceResolver( fun processCallableReferenceArgument( csBuilder: ConstraintSystemBuilder, resolvedAtom: ResolvedCallableReferenceAtom, - diagnosticsHolder: KotlinDiagnosticsHolder + diagnosticsHolder: KotlinDiagnosticsHolder, + resolutionCallbacks: KotlinResolutionCallbacks ) { val argument = resolvedAtom.atom val expectedType = resolvedAtom.expectedType?.let { (csBuilder.buildCurrentSubstitutor() as NewTypeSubstitutor).safeSubstitute(it) } val scopeTower = callComponents.statelessCallbacks.getScopeTowerForCallableReferenceArgument(argument) - val candidates = runRHSResolution(scopeTower, argument, expectedType, csBuilder) { checkCallableReference -> + val candidates = runRHSResolution(scopeTower, argument, expectedType, csBuilder, resolutionCallbacks) { checkCallableReference -> csBuilder.runTransaction { checkCallableReference(this); false } } @@ -144,10 +144,11 @@ class CallableReferenceResolver( callableReference: CallableReferenceKotlinCallArgument, expectedType: UnwrappedType?, // this type can have not fixed type variable inside csBuilder: ConstraintSystemBuilder, + resolutionCallbacks: KotlinResolutionCallbacks, compatibilityChecker: ((ConstraintSystemOperation) -> Unit) -> Unit // you can run anything throw this operation and all this operation will be rolled back ): Set { val factory = CallableReferencesCandidateFactory( - callableReference, callComponents, scopeTower, compatibilityChecker, expectedType, csBuilder + callableReference, callComponents, scopeTower, compatibilityChecker, expectedType, csBuilder, resolutionCallbacks ) val processor = createCallableReferenceProcessor(factory) val candidates = towerResolver.runResolve(scopeTower, processor, useOrder = true, name = callableReference.rhsName) diff --git a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/ExternalComponents.kt b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/ExternalComponents.kt index 0f3894846f2..4262dae37a8 100644 --- a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/ExternalComponents.kt +++ b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/ExternalComponents.kt @@ -27,6 +27,10 @@ interface KotlinResolutionStatelessCallbacks { fun isInfixCall(kotlinCall: KotlinCall): Boolean fun isOperatorCall(kotlinCall: KotlinCall): Boolean fun isSuperOrDelegatingConstructorCall(kotlinCall: KotlinCall): Boolean + fun isHiddenInResolution( + descriptor: DeclarationDescriptor, kotlinCallArgument: KotlinCallArgument, resolutionCallbacks: KotlinResolutionCallbacks + ): Boolean + fun isHiddenInResolution( descriptor: DeclarationDescriptor, kotlinCall: KotlinCall, resolutionCallbacks: KotlinResolutionCallbacks ): Boolean diff --git a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/PostponedArgumentsAnalyzer.kt b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/PostponedArgumentsAnalyzer.kt index bf3c6e3aa45..b3480170c80 100644 --- a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/PostponedArgumentsAnalyzer.kt +++ b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/PostponedArgumentsAnalyzer.kt @@ -58,7 +58,7 @@ class PostponedArgumentsAnalyzer( ) is ResolvedCallableReferenceAtom -> - callableReferenceResolver.processCallableReferenceArgument(c.getBuilder(), argument, diagnosticsHolder) + callableReferenceResolver.processCallableReferenceArgument(c.getBuilder(), argument, diagnosticsHolder, resolutionCallbacks) is ResolvedCollectionLiteralAtom -> TODO("Not supported") diff --git a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/ResolutionParts.kt b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/ResolutionParts.kt index 7ae40ef9e6b..8117f10a9eb 100644 --- a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/ResolutionParts.kt +++ b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/ResolutionParts.kt @@ -638,7 +638,7 @@ internal object EagerResolveOfCallableReferences : ResolutionPart() { getSubResolvedAtoms() .filterIsInstance() .forEach { - callableReferenceResolver.processCallableReferenceArgument(csBuilder, it, this) + callableReferenceResolver.processCallableReferenceArgument(csBuilder, it, this, resolutionCallbacks) } } } diff --git a/compiler/testData/diagnostics/tests/deprecated/deprecatedHiddenOnCallableReferenceArgument.fir.kt b/compiler/testData/diagnostics/tests/deprecated/deprecatedHiddenOnCallableReferenceArgument.fir.kt new file mode 100644 index 00000000000..e4a34b1f051 --- /dev/null +++ b/compiler/testData/diagnostics/tests/deprecated/deprecatedHiddenOnCallableReferenceArgument.fir.kt @@ -0,0 +1,23 @@ +// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION + +object Scope { + fun foo(): Int = 0 + + object Nested { + @Deprecated("err", level = DeprecationLevel.HIDDEN) + fun foo(): String = "" + + fun take(f: () -> T): T = f() + + fun test() { + val r1 = take(::foo) + r1 + + val r2 = ::foo + ")!>r2 + + val r3 = foo() + r3 + } + } +} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/deprecated/deprecatedHiddenOnCallableReferenceArgument.kt b/compiler/testData/diagnostics/tests/deprecated/deprecatedHiddenOnCallableReferenceArgument.kt new file mode 100644 index 00000000000..728e6ea3330 --- /dev/null +++ b/compiler/testData/diagnostics/tests/deprecated/deprecatedHiddenOnCallableReferenceArgument.kt @@ -0,0 +1,23 @@ +// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION + +object Scope { + fun foo(): Int = 0 + + object Nested { + @Deprecated("err", level = DeprecationLevel.HIDDEN) + fun foo(): String = "" + + fun take(f: () -> T): T = f() + + fun test() { + val r1 = take(::foo) + r1 + + val r2 = ::foo + ")!>r2 + + val r3 = foo() + r3 + } + } +} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/deprecated/deprecatedHiddenOnCallableReferenceArgument.txt b/compiler/testData/diagnostics/tests/deprecated/deprecatedHiddenOnCallableReferenceArgument.txt new file mode 100644 index 00000000000..55568cb0c81 --- /dev/null +++ b/compiler/testData/diagnostics/tests/deprecated/deprecatedHiddenOnCallableReferenceArgument.txt @@ -0,0 +1,19 @@ +package + +public object Scope { + private constructor Scope() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public final fun foo(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String + + public object Nested { + private constructor Nested() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + @kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "err") public final fun foo(): kotlin.String + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public final fun take(/*0*/ f: () -> T): T + public final fun test(): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String + } +} diff --git a/compiler/testData/diagnostics/tests/deprecated/deprecatedSinceKotlin/deprecatedSinceKotlinHiddenOnReferenceArgument.fir.kt b/compiler/testData/diagnostics/tests/deprecated/deprecatedSinceKotlin/deprecatedSinceKotlinHiddenOnReferenceArgument.fir.kt new file mode 100644 index 00000000000..ddadd6b1256 --- /dev/null +++ b/compiler/testData/diagnostics/tests/deprecated/deprecatedSinceKotlin/deprecatedSinceKotlinHiddenOnReferenceArgument.fir.kt @@ -0,0 +1,26 @@ +// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION + +package kotlin + +object Scope { + fun foo(): Int = 0 + + object Nested { + @Deprecated("err") + @DeprecatedSinceKotlin(hiddenSince = "1.0") + fun foo(): String = "" + + fun take(f: () -> T): T = f() + + fun test() { + val r1 = take(::foo) + r1 + + val r2 = ::foo + ")!>r2 + + val r3 = foo() + r3 + } + } +} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/deprecated/deprecatedSinceKotlin/deprecatedSinceKotlinHiddenOnReferenceArgument.kt b/compiler/testData/diagnostics/tests/deprecated/deprecatedSinceKotlin/deprecatedSinceKotlinHiddenOnReferenceArgument.kt new file mode 100644 index 00000000000..4dd1e3f80fb --- /dev/null +++ b/compiler/testData/diagnostics/tests/deprecated/deprecatedSinceKotlin/deprecatedSinceKotlinHiddenOnReferenceArgument.kt @@ -0,0 +1,26 @@ +// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION + +package kotlin + +object Scope { + fun foo(): Int = 0 + + object Nested { + @Deprecated("err") + @DeprecatedSinceKotlin(hiddenSince = "1.0") + fun foo(): String = "" + + fun take(f: () -> T): T = f() + + fun test() { + val r1 = take(::foo) + r1 + + val r2 = ::foo + ")!>r2 + + val r3 = foo() + r3 + } + } +} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/deprecated/deprecatedSinceKotlin/deprecatedSinceKotlinHiddenOnReferenceArgument.txt b/compiler/testData/diagnostics/tests/deprecated/deprecatedSinceKotlin/deprecatedSinceKotlinHiddenOnReferenceArgument.txt new file mode 100644 index 00000000000..4c8b25d0219 --- /dev/null +++ b/compiler/testData/diagnostics/tests/deprecated/deprecatedSinceKotlin/deprecatedSinceKotlinHiddenOnReferenceArgument.txt @@ -0,0 +1,22 @@ +package + +package kotlin { + + public object Scope { + private constructor Scope() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public final fun foo(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String + + public object Nested { + private constructor Nested() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + @kotlin.Deprecated(message = "err") @kotlin.DeprecatedSinceKotlin(hiddenSince = "1.0") public final fun foo(): kotlin.String + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public final fun take(/*0*/ f: () -> T): T + public final fun test(): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String + } + } +} diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestGenerated.java index 7bbca7f9866..4890c90ef08 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestGenerated.java @@ -6542,6 +6542,11 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTestWithFirVali runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedHidden.kt"); } + @TestMetadata("deprecatedHiddenOnCallableReferenceArgument.kt") + public void testDeprecatedHiddenOnCallableReferenceArgument() throws Exception { + runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedHiddenOnCallableReferenceArgument.kt"); + } + @TestMetadata("deprecatedInheritance.kt") public void testDeprecatedInheritance() throws Exception { runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedInheritance.kt"); @@ -6684,6 +6689,11 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTestWithFirVali runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedSinceKotlin/deprecatedSinceKotlinDeclaration.kt"); } + @TestMetadata("deprecatedSinceKotlinHiddenOnReferenceArgument.kt") + public void testDeprecatedSinceKotlinHiddenOnReferenceArgument() throws Exception { + runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedSinceKotlin/deprecatedSinceKotlinHiddenOnReferenceArgument.kt"); + } + @TestMetadata("deprecatedSinceKotlinOutsideKotlinPackage.kt") public void testDeprecatedSinceKotlinOutsideKotlinPackage() throws Exception { runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedSinceKotlin/deprecatedSinceKotlinOutsideKotlinPackage.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsUsingJavacTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsUsingJavacTestGenerated.java index cddc3b9ece9..5c0e45c50fb 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsUsingJavacTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsUsingJavacTestGenerated.java @@ -6537,6 +6537,11 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedHidden.kt"); } + @TestMetadata("deprecatedHiddenOnCallableReferenceArgument.kt") + public void testDeprecatedHiddenOnCallableReferenceArgument() throws Exception { + runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedHiddenOnCallableReferenceArgument.kt"); + } + @TestMetadata("deprecatedInheritance.kt") public void testDeprecatedInheritance() throws Exception { runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedInheritance.kt"); @@ -6679,6 +6684,11 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedSinceKotlin/deprecatedSinceKotlinDeclaration.kt"); } + @TestMetadata("deprecatedSinceKotlinHiddenOnReferenceArgument.kt") + public void testDeprecatedSinceKotlinHiddenOnReferenceArgument() throws Exception { + runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedSinceKotlin/deprecatedSinceKotlinHiddenOnReferenceArgument.kt"); + } + @TestMetadata("deprecatedSinceKotlinOutsideKotlinPackage.kt") public void testDeprecatedSinceKotlinOutsideKotlinPackage() throws Exception { runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedSinceKotlin/deprecatedSinceKotlinOutsideKotlinPackage.kt");