Fix inline codegen on local functions inside inlined lambda

The problem was that anonymous classes wasn't regenerated
although they capture another anonymous class that is a subject
for regeneration

 #KT-8689 Fixed
This commit is contained in:
Denis Zharkov
2017-02-16 10:55:07 +03:00
parent dfb60ba4ac
commit e16b0524b6
7 changed files with 137 additions and 5 deletions
@@ -200,6 +200,12 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
doTest(fileName);
}
@TestMetadata("objectInLambdaCapturesAnotherObject.kt")
public void testObjectInLambdaCapturesAnotherObject() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/objectInLambdaCapturesAnotherObject.kt");
doTest(fileName);
}
@TestMetadata("safeCall.kt")
public void testSafeCall() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/safeCall.kt");
@@ -1151,11 +1157,23 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/localFunInLambda"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
}
@TestMetadata("lambdaInLambdaCapturesAnotherFun.kt")
public void testLambdaInLambdaCapturesAnotherFun() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/localFunInLambda/lambdaInLambdaCapturesAnotherFun.kt");
doTest(fileName);
}
@TestMetadata("localFunInLambda.kt")
public void testLocalFunInLambda() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambda.kt");
doTest(fileName);
}
@TestMetadata("localFunInLambdaCapturesAnotherFun.kt")
public void testLocalFunInLambdaCapturesAnotherFun() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambdaCapturesAnotherFun.kt");
doTest(fileName);
}
}
@TestMetadata("compiler/testData/codegen/boxInline/multifileClasses")