FIR2IR: Fix exception when local class used before declaration

This commit is contained in:
Denis.Zharkov
2021-10-22 16:49:02 +03:00
parent 0bdea4f20a
commit 2a8eacd4ba
11 changed files with 59 additions and 3 deletions
@@ -17261,6 +17261,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
runTest("compiler/testData/codegen/box/localClasses/localClassInParameterInitializer.kt");
}
@TestMetadata("localClassUsedBeforeDeclaration.kt")
public void testLocalClassUsedBeforeDeclaration() throws Exception {
runTest("compiler/testData/codegen/box/localClasses/localClassUsedBeforeDeclaration.kt");
}
@TestMetadata("localDataClass.kt")
public void testLocalDataClass() throws Exception {
runTest("compiler/testData/codegen/box/localClasses/localDataClass.kt");
@@ -16667,6 +16667,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/localClasses/localClassInParameterInitializer.kt");
}
@TestMetadata("localClassUsedBeforeDeclaration.kt")
public void testLocalClassUsedBeforeDeclaration() throws Exception {
runTest("compiler/testData/codegen/box/localClasses/localClassUsedBeforeDeclaration.kt");
}
@TestMetadata("localDataClass.kt")
public void testLocalDataClass() throws Exception {
runTest("compiler/testData/codegen/box/localClasses/localDataClass.kt");
@@ -15963,6 +15963,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
runTest("compiler/testData/codegen/box/localClasses/localClassInParameterInitializer.kt");
}
@TestMetadata("localClassUsedBeforeDeclaration.kt")
public void testLocalClassUsedBeforeDeclaration() throws Exception {
runTest("compiler/testData/codegen/box/localClasses/localClassUsedBeforeDeclaration.kt");
}
@TestMetadata("localDataClass.kt")
public void testLocalDataClass() throws Exception {
runTest("compiler/testData/codegen/box/localClasses/localDataClass.kt");
@@ -18704,6 +18704,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/localClasses/localClassInParameterInitializer.kt");
}
@Test
@TestMetadata("localClassUsedBeforeDeclaration.kt")
public void testLocalClassUsedBeforeDeclaration() throws Exception {
runTest("compiler/testData/codegen/box/localClasses/localClassUsedBeforeDeclaration.kt");
}
@Test
@TestMetadata("localDataClass.kt")
public void testLocalDataClass() throws Exception {