Fix resolve of last destructuring declaration in block
Last declaration in block is resolved in DEPENDENT mode because it has influence on return type and therefore fake call for destructuring declaration wasn't completed (see `getBlockReturnedTypeWithWritableScope`) Now we resolve fake call for destructuring declaration in INDEPENDENT mode as it doesn't have effect on return type #KT-15480 Fixed
This commit is contained in:
@@ -5652,6 +5652,12 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("lastDestructuringDeclarationInBlock.kt")
|
||||
public void testLastDestructuringDeclarationInBlock() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/lastDestructuringDeclarationInBlock.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("RedeclarationInForLoop.kt")
|
||||
public void testRedeclarationInForLoop() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/RedeclarationInForLoop.kt");
|
||||
|
||||
Reference in New Issue
Block a user