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:
+10
@@ -16843,6 +16843,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
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");
|
||||
@@ -16873,6 +16878,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
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");
|
||||
|
||||
+10
@@ -17888,6 +17888,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
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");
|
||||
@@ -17918,6 +17923,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
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");
|
||||
|
||||
Reference in New Issue
Block a user