mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 08:31:26 +00:00
classes, instead of MemberScope. The primary motivation was to fix issues around type-mapping for inline classes in FIR, which uses wrapped descriptors that have empty MemberScopes.
17 lines
337 B
Kotlin
Vendored
17 lines
337 B
Kotlin
Vendored
// !LANGUAGE: +InlineClasses
|
|
|
|
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"
|
|
} |