Why is it not possible to declare a typealias to C...
# kotlin-native
p
Why is it not possible to declare a typealias to CPointer<T> for expect declaration? e.g.
Copy code
expect class Image

actual typealias Image = platform.CoreVideo.CVPixelBufferRef // iOS -  'declaration is incompatible because number of type parameters is different'
d
That's very unlikely to be compatible.
What other `actual`s do you have for that
expect
.
p
I have a common part and an actual iOS and Android part actual for Android looks like this:
Copy code
actual typealias Image = Bitmap
s
CVPixelBufRef is very low level. You probably want to work with a higher level abstraction like CgImage or UIImage.
p
I can not and do not want to in our case we try to wrap ARFrame’s capturedImage
r
From the error it looks like it’s because
CPointer<T>
has a generic argument and your
expect
declaration and other `actual`s don’t. An
actual typealias
is extremely strict about how closely it must match the
expect
. It’s often more flexible to use a wrapper class instead.
3