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

Why does the second function below fail to compile, and what naming mechanism does the compiler normally use to make value-class overloads coexist?

@JvmInline value class Meters(val v: Double) @JvmInline value class Feet(val v: Double) fun travel(d: Meters) {} fun travel(d: Feet) {} // does this clash?