Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardKotlininline class boxing rulesSingle-choice MCQ

Consider an inline class whose underlying type is the primitive Int. When is its value boxed to its wrapper class versus boxed to java.lang.Integer?

@JvmInline value class Meters(val v: Int) fun useAny(a: Any) {} fun useInline(m: Meters) {} val m = Meters(5)