KT-38337 Fix inline class value coercion in delegated members

This commit is contained in:
Dmitry Petrov
2020-04-20 18:25:25 +03:00
parent 29f19c78f2
commit 318d4d17ba
15 changed files with 586 additions and 36 deletions
@@ -13734,11 +13734,6 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/inlineClasses/inlineFunctionInsideInlineClass.kt");
}
@TestMetadata("interfaceImplementationByDelegation.kt")
public void testInterfaceImplementationByDelegation() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/interfaceImplementationByDelegation.kt");
}
@TestMetadata("iterateOverArrayOfInlineClassValues.kt")
public void testIterateOverArrayOfInlineClassValues() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/iterateOverArrayOfInlineClassValues.kt");
@@ -14785,6 +14780,59 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
}
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/interfaceDelegation")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class InterfaceDelegation extends AbstractBlackBoxCodegenTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInInterfaceDelegation() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/interfaceDelegation"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("interfaceImplementationByDelegation.kt")
public void testInterfaceImplementationByDelegation() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/interfaceDelegation/interfaceImplementationByDelegation.kt");
}
@TestMetadata("kt38337.kt")
public void testKt38337() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/interfaceDelegation/kt38337.kt");
}
@TestMetadata("memberExtValDelegationWithInlineClassParameterTypes.kt")
public void testMemberExtValDelegationWithInlineClassParameterTypes() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/interfaceDelegation/memberExtValDelegationWithInlineClassParameterTypes.kt");
}
@TestMetadata("memberExtVarDelegationWithInlineClassParameterTypes.kt")
public void testMemberExtVarDelegationWithInlineClassParameterTypes() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/interfaceDelegation/memberExtVarDelegationWithInlineClassParameterTypes.kt");
}
@TestMetadata("memberFunDelegatedToInlineClassInt.kt")
public void testMemberFunDelegatedToInlineClassInt() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/interfaceDelegation/memberFunDelegatedToInlineClassInt.kt");
}
@TestMetadata("memberFunDelegatedToInlineClassLong.kt")
public void testMemberFunDelegatedToInlineClassLong() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/interfaceDelegation/memberFunDelegatedToInlineClassLong.kt");
}
@TestMetadata("memberFunDelegationToInlineClassWithInlineClassParameterTypes.kt")
public void testMemberFunDelegationToInlineClassWithInlineClassParameterTypes() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/interfaceDelegation/memberFunDelegationToInlineClassWithInlineClassParameterTypes.kt");
}
@TestMetadata("memberFunDelegationWithInlineClassParameterTypes.kt")
public void testMemberFunDelegationWithInlineClassParameterTypes() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/interfaceDelegation/memberFunDelegationWithInlineClassParameterTypes.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)