mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-03-10 08:31:29 +00:00
18 lines
401 B
Kotlin
Vendored
18 lines
401 B
Kotlin
Vendored
// IGNORE_BACKEND_FIR: JVM_IR
|
|
// IGNORE_BACKEND: JVM
|
|
// IGNORE_BACKEND: JVM_IR
|
|
// !LANGUAGE: +InlineClasses
|
|
|
|
@file:Suppress("RESERVED_MEMBER_INSIDE_INLINE_CLASS")
|
|
|
|
inline class Z(val data: Int) {
|
|
override fun equals(other: Any?): Boolean =
|
|
other is Z &&
|
|
data % 256 == other.data % 256
|
|
}
|
|
|
|
fun box(): String {
|
|
if (Z(0) != Z(256)) throw AssertionError()
|
|
|
|
return "OK"
|
|
} |