blob: fe8c858a91d99b8b823617a9d26a60bd8f07f964 [file]
// WITH_STDLIB
// WORKS_WHEN_VALUE_CLASS
// LANGUAGE: +JvmInlineMultiFieldValueClasses
OPTIONAL_JVM_INLINE_ANNOTATION
value class Z<T: Int>(val x: T)
class A {
fun foo() = Z(42)
}
fun test(a: A?) = a?.foo()!!
fun box(): String {
val t = test(A())
if (t.x != 42) throw AssertionError("$t")
return "OK"
}