Hello! Want to use value classes in multiplatform project in common source, but have faced with comp...
p
Hello! Want to use value classes in multiplatform project in common source, but have faced with compiltion error. If not annotating value class with JvmInline got error for jvm target, else got error in js target for unresolved Jvminline annotation.
g
You may need to use
expect
and
actual
Copy code
expect value class Foo(val a: String)

@JvmInline
actual value class Foo(val a: String)
e
you should be able to use the
@JvmInline
annotation in common sources, as long as you import it first