Call factory method for primary constructors of inner classes

We might want to add 'init' blocks later, so now, for the sake of
binary compatibility with 1.3-RC binaries, we have to generate these
'constructor' calls.

Note that in some tests inline class boxing is no longer redundant,
because resulting value is passed to 'constructor' as an argument.
This commit is contained in:
Dmitry Petrov
2018-08-30 16:04:20 +03:00
parent b1016936b2
commit a2900282fd
13 changed files with 119 additions and 26 deletions
@@ -11471,6 +11471,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithPrimitiveUnderlyingType.kt");
}
@TestMetadata("boxResultInlineClassOfConstructorCall.kt")
public void testBoxResultInlineClassOfConstructorCall() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/boxResultInlineClassOfConstructorCall.kt");
}
@TestMetadata("boxUnboxInlineClassesWithOperatorsGetSet.kt")
public void testBoxUnboxInlineClassesWithOperatorsGetSet() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/boxUnboxInlineClassesWithOperatorsGetSet.kt");
@@ -11761,6 +11766,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/inlineClasses/referToUnderlyingPropertyOfInlineClass.kt");
}
@TestMetadata("secondaryConstructorWithVararg.kt")
public void testSecondaryConstructorWithVararg() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/secondaryConstructorWithVararg.kt");
}
@TestMetadata("secondaryConstructorsInsideInlineClass.kt")
public void testSecondaryConstructorsInsideInlineClass() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/secondaryConstructorsInsideInlineClass.kt");