mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-03-16 08:31:29 +00:00
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
|
||||
.map { it.getNonStrictParentOfType<KtDeclaration>() }
|
||||
.filterNotNull()
|
||||
.filterTo(declarationsToResolve) { it !is KtAnonymousInitializer }
|
||||
.filterTo(declarationsToResolve) { it !is KtAnonymousInitializer && it !is KtDestructuringDeclaration }
|
||||
addResolveSessionBindingContext = true
|
||||
}
|
||||
}
|
||||
|
||||
6
idea/testData/intentions/changeVisibility/public/destructuringPropertyException.kt
vendored
Normal file
6
idea/testData/intentions/changeVisibility/public/destructuringPropertyException.kt
vendored
Normal file
@@ -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);
|
||||
}
|
||||
|
||||
@TestMetadata("destructuringPropertyException.kt")
|
||||
public void testDestructuringPropertyException() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/public/destructuringPropertyException.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("primaryConstructor.kt")
|
||||
public void testPrimaryConstructor() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/public/primaryConstructor.kt");
|
||||
|
||||
Reference in New Issue
Block a user