Add KClass.isFun modifier to reflection
#KT-38881 Fixed
This commit is contained in:
@@ -77,6 +77,10 @@ public class ClassReference(override val jClass: Class<*>) : KClass<Any>, ClassB
|
||||
override val isCompanion: Boolean
|
||||
get() = error()
|
||||
|
||||
@SinceKotlin("1.4")
|
||||
override val isFun: Boolean
|
||||
get() = error()
|
||||
|
||||
private fun error(): Nothing = throw KotlinReflectionNotSupportedError()
|
||||
|
||||
override fun equals(other: Any?) =
|
||||
|
||||
@@ -127,6 +127,12 @@ public actual interface KClass<T : Any> : KDeclarationContainer, KAnnotatedEleme
|
||||
@SinceKotlin("1.1")
|
||||
public val isCompanion: Boolean
|
||||
|
||||
/**
|
||||
* `true` if this class is a Kotlin functional interface.
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
public val isFun: 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