Does the compiler hate expected data class constru...
# multiplatform
m
Does the compiler hate expected data class constructors? It seems that any expected primary constructor I write (with corresponding actual versions) complains "Expected class constructor cannot have a property parameter", but if I take it away it complains that data classes have to have a primary constructor. Has AS just got itself in a knot or have I misunderstood something (again 😟)
a
Expected.kt
Copy code
expect data class User(name: String) {
  val name: String
}
Actual.kt
Copy code
actual data class User(
  actual val name: String
)
m
Thanks @andylamax,I'm pretty sure that's what I had, but I will check again. I've since converted to a ~POKO~POKC(is that a thing? 😄) to make it work. It is really just data with a few conversion methods, but...