Fix reification for crossinline lambdas inlined into object literal

Inline lambda could capture reified parameter of containing inline function ('a' function)
when it is inlined in another one.
If it's inlined in any anonymous object we should track it and
add reification marker to such anonymous object instance creation
to rewrite it on inlining bytecode of 'a' function.

  #KT-15997 Fixed
This commit is contained in:
Mikhael Bogdanov
2017-03-07 12:29:00 +01:00
parent 6b6d7a5030
commit 23698f93e0
6 changed files with 94 additions and 1 deletions
@@ -1886,6 +1886,18 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
doTest(fileName);
}
@TestMetadata("kt15997.kt")
public void testKt15997() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt15997.kt");
doTest(fileName);
}
@TestMetadata("kt15997_2.kt")
public void testKt15997_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt15997_2.kt");
doTest(fileName);
}
@TestMetadata("kt6988.kt")
public void testKt6988() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt6988.kt");