JVM_IR: check for null when converting unboxed inline classes to strings

`C?` can be unboxed into `T?` if if wraps a reference type `T!!`, but in
this case `null` is not a valid value to pass to `toString-impl`.

 #KT-42005 Fixed
This commit is contained in:
pyos
2020-09-24 16:21:39 +02:00
committed by Alexander Udalov
parent d2bdab2ef5
commit bd6ead0467
14 changed files with 125 additions and 39 deletions
@@ -3192,9 +3192,14 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
runTest("compiler/testData/codegen/bytecodeText/inlineClasses/suspendFunctionMangling.kt");
}
@TestMetadata("toStringIsCalledByInlineClass.kt")
public void testToStringIsCalledByInlineClass() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/inlineClasses/toStringIsCalledByInlineClass.kt");
@TestMetadata("toStringOfInlineClassValue.kt")
public void testToStringOfInlineClassValue() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/inlineClasses/toStringOfInlineClassValue.kt");
}
@TestMetadata("toStringOfReferenceInlineClassValue.kt")
public void testToStringOfReferenceInlineClassValue() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/inlineClasses/toStringOfReferenceInlineClassValue.kt");
}
@TestMetadata("uIntArrayIteratorWithoutBoxing.kt")