Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardKotlinvalue class codegenSingle-choice MCQ

A value class implements an interface. You call the interface method through an interface-typed reference. What representation is in effect for the receiver at that call, and why?

interface Named { fun label(): String } @JvmInline value class Tag(val s: String) : Named { override fun label() = s } fun show(n: Named) = n.label() val r = show(Tag("x"))