JVM_IR: IC: Unbox inline class argument of callable reference
if it is unbound and the underlying type is reference type. If the underlying type is primitive, it is boxed and unboxed correctly, otherwise, it is simply casted and not unboxed. Additionally, generate functions for inliner with inline classes in signature, so unboxing works. The unboxing is removed after inlining. #KT-44722 Fixed
This commit is contained in:
+52
@@ -18214,6 +18214,58 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
public void testKt37986() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/kt37986.kt");
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/callableReferences/let")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Let {
|
||||
@Test
|
||||
public void testAllFilesPresentInLet() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/callableReferences/let"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("any.kt")
|
||||
public void testAny() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/any.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("anyN.kt")
|
||||
public void testAnyN() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/anyN.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("int.kt")
|
||||
public void testInt() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/int.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("intN.kt")
|
||||
public void testIntN() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/intN.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("result.kt")
|
||||
public void testResult() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/result.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("string.kt")
|
||||
public void testString() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/string.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("stringN.kt")
|
||||
public void testStringN() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/stringN.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
|
||||
+52
@@ -18214,6 +18214,58 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
public void testKt37986() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/kt37986.kt");
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/callableReferences/let")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Let {
|
||||
@Test
|
||||
public void testAllFilesPresentInLet() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/callableReferences/let"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("any.kt")
|
||||
public void testAny() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/any.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("anyN.kt")
|
||||
public void testAnyN() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/anyN.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("int.kt")
|
||||
public void testInt() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/int.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("intN.kt")
|
||||
public void testIntN() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/intN.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("result.kt")
|
||||
public void testResult() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/result.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("string.kt")
|
||||
public void testString() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/string.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("stringN.kt")
|
||||
public void testStringN() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/stringN.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
|
||||
Reference in New Issue
Block a user