https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
d

Dmitri Sh

12/04/2019, 4:05 AM
with an expected class in shared, not possible to have any method implementation? All methods must be actualized in platform specific actuals? I have a class (decorator) that can have some of its methods actually implemented in shared - but am forced to duplicate the code in actuals. Is this (no pun intended) "expected"? Seems like a waste.
k

Konstantin Petrukhnov

12/04/2019, 8:37 AM
You could extract common parts to separate class. But it is more like workaround.
d

Dmitri Sh

12/04/2019, 6:16 PM
right, but not clean, and especially in this particular case - as I mentioned, it is a decorator around model data class (for some logical operations on the model), all methods really belong in this particular class