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:
+48
@@ -15168,6 +15168,54 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
public void testKt37986() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/kt37986.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/callableReferences/let")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Let extends AbstractLightAnalysisModeTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
@TestMetadata("any.kt")
|
||||
public void testAny() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/any.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("anyN.kt")
|
||||
public void testAnyN() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/anyN.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("int.kt")
|
||||
public void testInt() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/int.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("intN.kt")
|
||||
public void testIntN() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/intN.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("result.kt")
|
||||
public void testResult() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/result.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("string.kt")
|
||||
public void testString() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/string.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("stringN.kt")
|
||||
public void testStringN() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/stringN.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/contextsAndAccessors")
|
||||
|
||||
Reference in New Issue
Block a user