c7435ba760
We are going to deprecate `WITH_RUNTIME` directive. The main reason behind this change is that `WITH_STDLIB` directive better describes its meaning, specifically it will add kotlin stdlib to test's classpath.
23 lines
569 B
Kotlin
Vendored
23 lines
569 B
Kotlin
Vendored
// WITH_STDLIB
|
|
|
|
@Suppress("OPTIONAL_DECLARATION_USAGE_IN_NON_COMMON_SOURCE")
|
|
@kotlin.jvm.JvmInline
|
|
value class Z1(val x: String)
|
|
@Suppress("OPTIONAL_DECLARATION_USAGE_IN_NON_COMMON_SOURCE")
|
|
@kotlin.jvm.JvmInline
|
|
value class ZN(val z: Z1?)
|
|
@Suppress("OPTIONAL_DECLARATION_USAGE_IN_NON_COMMON_SOURCE")
|
|
@kotlin.jvm.JvmInline
|
|
value class ZN2(val z: ZN)
|
|
|
|
fun zap(b: Boolean): ZN2? = if (b) null else ZN2(ZN(null))
|
|
|
|
fun eq(a: Any?, b: Any?) = a == b
|
|
|
|
fun box(): String {
|
|
val x = zap(true)
|
|
val y = zap(false)
|
|
if (eq(x, y)) throw AssertionError()
|
|
|
|
return "OK"
|
|
} |