Support boxing/unboxing for method return types

This commit is contained in:
Mikhail Zarechenskiy
2018-02-05 11:43:10 +03:00
parent 390c214943
commit c5c8d84719
15 changed files with 210 additions and 100 deletions
@@ -1914,6 +1914,12 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
}
@TestMetadata("boxUnboxInlineClassFromMethodReturnType.kt")
public void testBoxUnboxInlineClassFromMethodReturnType() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inlineClasses/boxUnboxInlineClassFromMethodReturnType.kt");
doTest(fileName);
}
@TestMetadata("callMemberMethodsInsideInlineClass.kt")
public void testCallMemberMethodsInsideInlineClass() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inlineClasses/callMemberMethodsInsideInlineClass.kt");
@@ -1937,6 +1943,18 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inlineClasses/inlineClassBoxingOnFunctionCall.kt");
doTest(fileName);
}
@TestMetadata("unboxInlineClassAfterSafeCall.kt")
public void testUnboxInlineClassAfterSafeCall() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inlineClasses/unboxInlineClassAfterSafeCall.kt");
doTest(fileName);
}
@TestMetadata("unboxInlineClassesAfterSmartCasts.kt")
public void testUnboxInlineClassesAfterSmartCasts() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inlineClasses/unboxInlineClassesAfterSmartCasts.kt");
doTest(fileName);
}
}
@TestMetadata("compiler/testData/codegen/bytecodeText/interfaces")