[K2] Disappeared COMPONENT_FUNCTION_MISSING

^KT-59941
This commit is contained in:
Anastasia.Nekrasova
2023-10-18 20:57:28 +03:00
committed by Space Team
parent fc408125c8
commit 4f85cdbaed
3 changed files with 8 additions and 10 deletions
@@ -154,7 +154,13 @@ object FirDestructuringDeclarationChecker : FirPropertyChecker() {
is ConeConstraintSystemHasContradiction -> {
val componentType = componentCall.resolvedType
if (componentType is ConeErrorType) {
// There will be other errors on this error type.
reporter.reportOn(
source,
FirErrors.COMPONENT_FUNCTION_MISSING,
diagnostic.candidates.first().callInfo.name,
destructuringDeclarationType,
context
)
return
}
val expectedType = property.returnTypeRef.coneType
@@ -1,9 +0,0 @@
// !DIAGNOSTICS: -UNUSED_VARIABLE
class X
operator fun <T> X.component1(): T = TODO()
fun test() {
val (y) = X()
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !DIAGNOSTICS: -UNUSED_VARIABLE
class X