We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Kotlin_Any_hashCode
1 parent 7741256 commit d858cbaCopy full SHA for d858cba
kotlinx-coroutines-core/native/src/Debug.kt
@@ -5,14 +5,12 @@
5
package kotlinx.coroutines
6
7
import kotlin.math.*
8
+import kotlin.native.*
9
10
internal actual val DEBUG: Boolean = false
11
-internal actual val Any.hexAddress: String get() = abs(id().let { if (it == Int.MIN_VALUE) 0 else it }).toString(16)
12
+internal actual val Any.hexAddress: String get() = identityHashCode().toUInt().toString(16)
13
14
internal actual val Any.classSimpleName: String get() = this::class.simpleName ?: "Unknown"
15
-@SymbolName("Kotlin_Any_hashCode")
16
-public external fun Any.id(): Int // Note: can return negative value on K/N
17
-
18
internal actual inline fun assert(value: () -> Boolean) {}
0 commit comments