JVM_IR: use nullability when boxing/unboxing inline class types

Given inline class V(Any?), a coercion from (Object, V) to (Object, V?)
is boxing.

In theory, the same issue in the old backend can be fixed by making
`KotlinTypeMapper.mapUnderlyingTypeOfInlineClassType` use
`computeExpandedTypeForInlineClass`, but for some reason this breaks a
lot of stuff.

 #KT-48430 Fixed
This commit is contained in:
pyos
2021-08-30 12:27:40 +02:00
committed by teamcityserver
parent 70e8d23d6b
commit 0f2937bae5
@@ -15222,6 +15222,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/inlineClasses/boxImplDoesNotExecuteInitBlock.kt");
}
@TestMetadata("boxNullableForFakeOverride.kt")
public void testBoxNullableForFakeOverride() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/boxNullableForFakeOverride.kt");
}
@TestMetadata("boxNullableValueOfInlineClassWithNonNullUnderlyingType.kt")
public void testBoxNullableValueOfInlineClassWithNonNullUnderlyingType() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithNonNullUnderlyingType.kt");