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

An inline (value) class wraps a non-null `String`. Under the hood, in which case is the underlying value passed directly WITHOUT being boxed into a wrapper object, even though the source uses the value class?

@JvmInline value class Name(val value: String) fun greetA(n: Name) {} // (1) fun greetB(n: Name?) {} // (2) fun <T> id(x: T): T = x // id(Name(...)) -> (3)