checking out 2.2.0-RC: has the generated copy meth...
# javascript
b
checking out 2.2.0-RC: has the generated copy method been removed from @JsPlainObject? getting compile errors
1
a
Could you please clarify what situation triggers the compile errors? In 2.2.0-RC there is a breaking change (unfortunately) with the
copy
method, so there is no more
copy
method on the instance itself but on its companion object. So, the following code will trigger the compilation error intentionally:
Copy code
val user = User(name = "Artem", age = 26)
val copy = user.copy(age = 27) // Here will be a compilation error
So, such places should be reworked in the following way:
Copy code
val user = User(name = "Artem", age = 26)
val copy = User.copy(user, age = 27) // No more compilation errors
b
ah, probably badly worded: yeah, typechecker errors
and that makes sense in that case
thank you!