[K2]: Missing error and miscompilation in destructuring declaration delegation
In convertDestructingDeclaration, property delegates are mistakenly treated as valid expressions for destructuring, but they should be ignored. #KT-65021 Fixed
This commit is contained in:
committed by
Space Team
parent
b0367d9399
commit
1d817e2ace
+16
@@ -11609,6 +11609,22 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/diagnostics/tests/destructuring")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Destructuring {
|
||||
@Test
|
||||
public void testAllFilesPresentInDestructuring() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/destructuring"), Pattern.compile("^(.+)\\.(kt|kts)$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("delegationInDestructuring.kt")
|
||||
public void testDelegationInDestructuring() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/destructuring/delegationInDestructuring.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+16
@@ -11609,6 +11609,22 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/diagnostics/tests/destructuring")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Destructuring {
|
||||
@Test
|
||||
public void testAllFilesPresentInDestructuring() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/destructuring"), Pattern.compile("^(.+)\\.(kt|kts)$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("delegationInDestructuring.kt")
|
||||
public void testDelegationInDestructuring() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/destructuring/delegationInDestructuring.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
Reference in New Issue
Block a user