Can I typeAlias a class with expect and then add e...
# multiplatform
m
Can I typeAlias a class with expect and then add extension functions to it in the respective platform portions? I've tried it with the bare "expect class" statement in common and then adding extension functions in the platform code, but I'm then finding the rest of the code doesn't find the extension functions. It doesn't seem to matter if I extend the typeAlias or the original class. Is it doable?
m
To access the extension function in common code, you need to declare an expect function for the extension and add the actual implementations in the platform specific source.
m
Ah, yes, I've missed that, thanks, I'll give it a go. Yup, that seems to do it! Many thanks @mkrussel