No more attempts to resolve KtDestructuringDeclaration to descriptor #KT-7929 Fixed
Also #KT-8442 Fixed
This commit is contained in:
@@ -217,7 +217,7 @@ class ResolveElementCache(
|
|||||||
contextElements
|
contextElements
|
||||||
.map { it.getNonStrictParentOfType<KtDeclaration>() }
|
.map { it.getNonStrictParentOfType<KtDeclaration>() }
|
||||||
.filterNotNull()
|
.filterNotNull()
|
||||||
.filterTo(declarationsToResolve) { it !is KtAnonymousInitializer }
|
.filterTo(declarationsToResolve) { it !is KtAnonymousInitializer && it !is KtDestructuringDeclaration }
|
||||||
addResolveSessionBindingContext = true
|
addResolveSessionBindingContext = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+6
@@ -0,0 +1,6 @@
|
|||||||
|
// IS_APPLICABLE: false
|
||||||
|
|
||||||
|
// See KT-7929: exception
|
||||||
|
class C {
|
||||||
|
<caret>val (v1, v2) = Pair(1, 2)
|
||||||
|
}
|
||||||
@@ -2768,6 +2768,12 @@ public class IntentionTestGenerated extends AbstractIntentionTest {
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("destructuringPropertyException.kt")
|
||||||
|
public void testDestructuringPropertyException() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/public/destructuringPropertyException.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("primaryConstructor.kt")
|
@TestMetadata("primaryConstructor.kt")
|
||||||
public void testPrimaryConstructor() throws Exception {
|
public void testPrimaryConstructor() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/public/primaryConstructor.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/public/primaryConstructor.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user