Is it possible to check if a reified type is an in...
# reflect
a
Is it possible to check if a reified type is an inline/value class?
w
Is this what you mean? You need
kotlin-reflect
to run it.
Copy code
@JvmInline
value class VC(val value: Int)

inline fun <reified T> rf() {
    println(T::class.isValue)
}

fun main() {
    rf<Any>() // -> false
    rf<VC>()  // -> true
}
a
great thanks!