mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
18 lines
367 B
Kotlin
Vendored
18 lines
367 B
Kotlin
Vendored
// !LANGUAGE: +InlineClasses
|
|
// IGNORE_BACKEND_FIR: JVM_IR
|
|
|
|
inline class Z1(val x: String)
|
|
inline class ZN(val z: Z1?)
|
|
inline 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"
|
|
} |