Box/unbox nullable inline class values with null check
When we have a nullable inline class value with non-null underlying type, corresponding value in unboxed representation is nullable. E.g.: inline class Str(val value: String) fun test(s: Str?) = listOf(s) Here 'test(s: Str?)' accepts nullable 'java.lang.String' as a parameter. When boxing/unboxing nullable values of such inline classes, take care of nulls. #KT-26052 Fixed Target versions 1.3-M2
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR, JS_IR, JS
|
||||
// IGNORE_BACKEND: JVM_IR, JS
|
||||
|
||||
inline class Z(val value: Int)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user