Add KClass.isValue to kotlin-reflect
#KT-44782 Fixed
This commit is contained in:
@@ -81,6 +81,10 @@ public class ClassReference(override val jClass: Class<*>) : KClass<Any>, ClassB
|
||||
override val isFun: Boolean
|
||||
get() = error()
|
||||
|
||||
@SinceKotlin("1.5")
|
||||
override val isValue: Boolean
|
||||
get() = error()
|
||||
|
||||
private fun error(): Nothing = throw KotlinReflectionNotSupportedError()
|
||||
|
||||
override fun equals(other: Any?) =
|
||||
|
||||
@@ -133,6 +133,12 @@ public actual interface KClass<T : Any> : KDeclarationContainer, KAnnotatedEleme
|
||||
@SinceKotlin("1.4")
|
||||
public val isFun: Boolean
|
||||
|
||||
/**
|
||||
* `true` if this class is a value class.
|
||||
*/
|
||||
@SinceKotlin("1.5")
|
||||
public val isValue: Boolean
|
||||
|
||||
/**
|
||||
* Returns `true` if this [KClass] instance represents the same Kotlin class as the class represented by [other].
|
||||
* On JVM this means that all of the following conditions are satisfied:
|
||||
|
||||
Reference in New Issue
Block a user