Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardKotlintype erasure on the JVMSingle-choice MCQ

An `inline fun <reified T> tag(): String = T::class.java.name`. A senior asks how reification sidesteps erasure given the JVM still has no runtime generic args. What actually happens at the call site?

inline fun <reified T> tag(): String = T::class.java.name val s = tag<List<String>>() // T baked in as List at the call site