KT-7929 related: incorrect KtDestructuringDeclarationEntry is not resolved to descriptor, fixes EA-76715
This commit is contained in:
@@ -217,7 +217,9 @@ class ResolveElementCache(
|
||||
contextElements
|
||||
.map { it.getNonStrictParentOfType<KtDeclaration>() }
|
||||
.filterNotNull()
|
||||
.filterTo(declarationsToResolve) { it !is KtAnonymousInitializer && it !is KtDestructuringDeclaration }
|
||||
.filterTo(declarationsToResolve) {
|
||||
it !is KtAnonymousInitializer && it !is KtDestructuringDeclaration && it !is KtDestructuringDeclarationEntry
|
||||
}
|
||||
addResolveSessionBindingContext = true
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
// IS_APPLICABLE: false
|
||||
|
||||
// See KT-7929, EA-76715
|
||||
class C {
|
||||
val (<caret>x, y) = Pair(1, 2)
|
||||
}
|
||||
@@ -6290,6 +6290,12 @@ public class IntentionTestGenerated extends AbstractIntentionTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ExceptionInPropertyDestructuringEntry.kt")
|
||||
public void testExceptionInPropertyDestructuringEntry() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/deprecatedCallableAddReplaceWith/ExceptionInPropertyDestructuringEntry.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ExpressionBody.kt")
|
||||
public void testExpressionBody() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/deprecatedCallableAddReplaceWith/ExpressionBody.kt");
|
||||
|
||||
Reference in New Issue
Block a user