[FIR][checkers] Handle ConeHiddenCandidateError in FirDestructuringDeclarationChecker properly

#KT-66595 Fixed
This commit is contained in:
Stanislav Ruban
2024-03-14 11:59:40 +02:00
committed by Space Team
parent 89a0cde514
commit e9d5396fa9
3 changed files with 10 additions and 13 deletions
@@ -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,
@@ -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
}
@@ -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)