blob: d599b6b7688c67f3e41baf821b89f9f931803cda [file]
// WITH_STDLIB
// WORKS_WHEN_VALUE_CLASS
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"
}