All Downloads are FREE. Search and download functionalities are using the official Maven repository.

allNativeMain.org.kodein.mock.platformNative.kt Maven / Gradle / Ivy

There is a newer version: 2.0.0
Show newest version
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