When I try to compile a data class with default va...
# multiplatform
d
When I try to compile a data class with default values with the IR compiler to JavaScript, I get this error:
IllegalStateException: Can't find name for declaration FUN name:Foo_init_$Create$ visibility:public modality:FINAL <> (bar:kotlin.String?, $mask0:<http://kotlin.Int|kotlin.Int>, $marker:kotlin.js.DefaultConstructorMarker?) returnType:api.model.Foo
. I assume this is a bug but is there a small workaround for it? Or do I need to wait until it is fixed?
Copy code
@ExperimentalJsExport
@JsExport
data class Foo(
    val bar: String? = null
)
a
What is the workarround? Also, I am actively building for JS and I haven't gotten that error