I take it non-empty constructors are no longer sup...
# javascript
j
I take it non-empty constructors are no longer supported in 1.4.0-rc? This used to work fine up to 1.4-M3
Copy code
@JsExport
@ExperimentalJsExport
class LoginState(
	json: String? = null,
) {
now in RC the compiler complains:
Copy code
e: java.lang.IllegalStateException: Can't find name for declaration FUN SYNTHESIZED_DECLARATION name:LoginState_init_$Create$ visibility:public modality:FINAL <> (json:kotlin.String?, $mask0:<http://kotlin.Int|kotlin.Int>, $marker:kotlin.js.DefaultConstructorMarker?) returnType:com.rezproperty.modules.account.state.LoginState
and neither is adding a second constructor after removing the param from the default constructor?
Copy code
@JsExport
@ExperimentalJsExport
class LoginState() {

	@JsName("LoginStateWithJson")
	constructor(json: String): this() {
        ...
	}
Copy code
e: java.lang.IllegalStateException: Can't find name for declaration FUN SYNTHESIZED_DECLARATION name:LoginState_init_$Create$ visibility:public modality:FINAL <> (json:kotlin.String) returnType:com.rezproperty.modules.account.state.LoginState
youtrack 1
r
It works for me
Do you use IR or legacy backend?
I've tested both and it works fine
j
i'm on IR
restarting intellij fixed it, crazy now to rollback everything i've done