Fix closure's reference to outer closure
#KT-3276 Fixed
This commit is contained in:
+41
-1
@@ -888,6 +888,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/closures")
|
||||
@InnerTestClasses({Closures.ClosureInsideClosure.class})
|
||||
public static class Closures extends AbstractBlackBoxCodegenTest {
|
||||
public void testAllFilesPresentInClosures() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/codegen/box/closures"), "kt", true);
|
||||
@@ -943,6 +944,45 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
blackBoxFileByFullPath("compiler/testData/codegen/box/closures/simplestClosureAndBoxing.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/closures/closureInsideClosure")
|
||||
public static class ClosureInsideClosure extends AbstractBlackBoxCodegenTest {
|
||||
public void testAllFilesPresentInClosureInsideClosure() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/codegen/box/closures/closureInsideClosure"), "kt", true);
|
||||
}
|
||||
|
||||
@TestMetadata("localFunInsideLocalFun.kt")
|
||||
public void testLocalFunInsideLocalFun() throws Exception {
|
||||
blackBoxFileByFullPath("compiler/testData/codegen/box/closures/closureInsideClosure/localFunInsideLocalFun.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("localFunInsideLocalFunDifferentSignatures.kt")
|
||||
public void testLocalFunInsideLocalFunDifferentSignatures() throws Exception {
|
||||
blackBoxFileByFullPath("compiler/testData/codegen/box/closures/closureInsideClosure/localFunInsideLocalFunDifferentSignatures.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("threeLevels.kt")
|
||||
public void testThreeLevels() throws Exception {
|
||||
blackBoxFileByFullPath("compiler/testData/codegen/box/closures/closureInsideClosure/threeLevels.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("threeLevelsDifferentSignatures.kt")
|
||||
public void testThreeLevelsDifferentSignatures() throws Exception {
|
||||
blackBoxFileByFullPath("compiler/testData/codegen/box/closures/closureInsideClosure/threeLevelsDifferentSignatures.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("varAsFunInsideLocalFun.kt")
|
||||
public void testVarAsFunInsideLocalFun() throws Exception {
|
||||
blackBoxFileByFullPath("compiler/testData/codegen/box/closures/closureInsideClosure/varAsFunInsideLocalFun.kt");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static Test innerSuite() {
|
||||
TestSuite suite = new TestSuite("Closures");
|
||||
suite.addTestSuite(Closures.class);
|
||||
suite.addTestSuite(ClosureInsideClosure.class);
|
||||
return suite;
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/controlStructures")
|
||||
@@ -3306,7 +3346,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
suite.addTestSuite(Bridges.class);
|
||||
suite.addTestSuite(Casts.class);
|
||||
suite.addTestSuite(Classes.class);
|
||||
suite.addTestSuite(Closures.class);
|
||||
suite.addTest(Closures.innerSuite());
|
||||
suite.addTestSuite(ControlStructures.class);
|
||||
suite.addTest(DefaultArguments.innerSuite());
|
||||
suite.addTestSuite(Enum.class);
|
||||
|
||||
Reference in New Issue
Block a user