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

A `reified` type parameter lets you write `T::class` and `is T` inside an `inline fun`. What mechanism actually makes this work, and what is its hard limitation?

inline fun <reified T> filterIs(list: List<Any>): List<T> = list.filter { it is T }