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

For an inline (value) class declared as `@JvmInline value class UserId(val raw: Long)`, in which of these situations is the underlying Long value definitively boxed into a UserId wrapper object?

@JvmInline value class UserId(val raw: Long) fun direct(id: UserId) {} fun <T> generic(id: T) {} val list: List<UserId> = listOf(UserId(1)) val n: UserId? = UserId(2)