diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirDestructuringDeclarationChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirDestructuringDeclarationChecker.kt index 3d171ec62af..4899657e409 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirDestructuringDeclarationChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirDestructuringDeclarationChecker.kt @@ -124,6 +124,15 @@ object FirDestructuringDeclarationChecker : FirPropertyChecker(MppCheckerKind.Co context ) } + is ConeHiddenCandidateError -> { + reporter.reportOn( + source, + FirErrors.COMPONENT_FUNCTION_MISSING, + diagnostic.candidate.callInfo.name, + destructuringDeclarationType, + context + ) + } is ConeInapplicableWrongReceiver -> { reporter.reportOn( source, diff --git a/compiler/testData/diagnostics/tests/deprecated/hiddenComponentInDestructuringDeclaration.fir.kt b/compiler/testData/diagnostics/tests/deprecated/hiddenComponentInDestructuringDeclaration.fir.kt deleted file mode 100644 index a3bbbfae922..00000000000 --- a/compiler/testData/diagnostics/tests/deprecated/hiddenComponentInDestructuringDeclaration.fir.kt +++ /dev/null @@ -1,11 +0,0 @@ -// TARGET_FRONTEND: ClassicFrontend -// ^ reason for a FIR mute: KT-66595 - -class SimpleKlass { - @Deprecated("deprecated and hidden", level = DeprecationLevel.HIDDEN) - operator fun component1(): Int = 42 -} - -fun test(simpleKlass: SimpleKlass) { - val (s1) = simpleKlass -} diff --git a/compiler/testData/diagnostics/tests/deprecated/hiddenComponentInDestructuringDeclaration.kt b/compiler/testData/diagnostics/tests/deprecated/hiddenComponentInDestructuringDeclaration.kt index 7925663f8cf..efa89509305 100644 --- a/compiler/testData/diagnostics/tests/deprecated/hiddenComponentInDestructuringDeclaration.kt +++ b/compiler/testData/diagnostics/tests/deprecated/hiddenComponentInDestructuringDeclaration.kt @@ -1,5 +1,4 @@ -// TARGET_FRONTEND: ClassicFrontend -// ^ reason for a FIR mute: KT-66595 +// FIR_IDENTICAL class SimpleKlass { @Deprecated("deprecated and hidden", level = DeprecationLevel.HIDDEN)