When I try to compile a data class with default va...
# javascript
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
)
Posted in #multiplatform
t
Like this?
d
when I use
@file:JsExport
it works 🙂 thanks for the link
🙂 1