allNativeMain.org.kodein.mock.platformNative.kt Maven / Gradle / Ivy
package org.kodein.mock
import kotlin.reflect.KClass
// This works while this issue is unresolved:
// https://youtrack.jetbrains.com/issue/KT-40613
@Suppress("UNCHECKED_CAST")
private fun Any?.unsafeCast(): T = this as T
private object UnsafeValue
internal actual fun References.unsafeValue(cls: KClass<*>): T = UnsafeValue.unsafeCast()
@PublishedApi
internal actual fun KClass<*>.bestName(): String = qualifiedName ?: simpleName ?: "Unknown"
© 2015 - 2024 Weber Informatics LLC | Privacy Policy