Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardKotlinJVM bytecode for inline functionsSingle-choice MCQ

A reified type parameter is used inside an inline function, e.g. `inline fun <reified T> isType(x: Any) = x is T`. Why is `reified` only possible on inline functions, in terms of how type erasure is worked around at the bytecode level?

inline fun <reified T> filterIsType(list: List<Any>): List<T> = list.filterIsInstance<T>()