JVM_IR: create temporaries for complex SAM conversion arguments
To avoid bytecode sequences like
new _1Kt$sam$i$java_lang_Runnable$0
dup
new _1Kt$f$1
dup
invokespecial _1Kt$f$1.<init>()V
invokespecial _1Kt$sam$i$java_lang_Runnable$0.<init>(...)V
as the different order of `new` and `<init>` confuses the inliner.
This commit is contained in:
+5
@@ -432,6 +432,11 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/sam"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("anonymousObjectToSam.kt")
|
||||
public void testAnonymousObjectToSam() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/anonymousObjectToSam.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt17091.kt")
|
||||
public void testKt17091() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt17091.kt");
|
||||
|
||||
Reference in New Issue
Block a user