Support 'call' for primary value of an inline class

Getter of a primary value of an inline class belongs to the box class.
Its arguments should not be unboxed when the method is called.
However, its result might require boxing if it's an inline class value.

When we have an internal primary value, there's no getter method.
In fact, we can use box/unbox methods for inline class directly
(don't forget to box the result, it may be an inline class type value).

 #KT-26748
This commit is contained in:
Dmitry Petrov
2018-11-08 16:27:32 +03:00
parent 78ee48e1cd
commit 99d8f2eb0c
15 changed files with 369 additions and 36 deletions
@@ -19313,6 +19313,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/reflection/call/inlineClasses/inlineClassConstructor.kt");
}
@TestMetadata("internalPrimaryValOfInlineClass.kt")
public void testInternalPrimaryValOfInlineClass() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/inlineClasses/internalPrimaryValOfInlineClass.kt");
}
@TestMetadata("jvmStaticFieldInObject.kt")
public void testJvmStaticFieldInObject() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/inlineClasses/jvmStaticFieldInObject.kt");
@@ -19343,6 +19348,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/reflection/call/inlineClasses/overridingVarOfInlineClass.kt");
}
@TestMetadata("primaryValOfInlineClass.kt")
public void testPrimaryValOfInlineClass() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/inlineClasses/primaryValOfInlineClass.kt");
}
@TestMetadata("properties.kt")
public void testProperties() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/inlineClasses/properties.kt");
@@ -20150,6 +20160,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/reflection/mapping/functions.kt");
}
@TestMetadata("inlineClassPrimaryVal.kt")
public void testInlineClassPrimaryVal() throws Exception {
runTest("compiler/testData/codegen/box/reflection/mapping/inlineClassPrimaryVal.kt");
}
@TestMetadata("inlineReifiedFun.kt")
public void testInlineReifiedFun() throws Exception {
runTest("compiler/testData/codegen/box/reflection/mapping/inlineReifiedFun.kt");
@@ -20293,6 +20308,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/reflection/mapping/types/inlineClassInSignature.kt");
}
@TestMetadata("inlineClassPrimaryVal.kt")
public void testInlineClassPrimaryVal() throws Exception {
runTest("compiler/testData/codegen/box/reflection/mapping/types/inlineClassPrimaryVal.kt");
}
@TestMetadata("innerGenericTypeArgument.kt")
public void testInnerGenericTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/reflection/mapping/types/innerGenericTypeArgument.kt");