typeOf

Kotlin 1.3.40

@UseExperimental(ExperimentalStdlibApi::class)
infix fun <reified T> accessReifiedTypeArg() { 
  val kType = typeOf<T>()
  println(kType.toString())
}

Back Home Next