Well, I've made my `Page<T>` a class instead...
# multiplatform
b
Well, I've made my
Page<T>
a class instead of an interface, and it still doesn't work. Ideas?
k
Any way you can post a sample? I wrote the original generics support. I haven’t looked at it in a while, but I would expect
Page
to support generics if it’s a class. What does the generated header look like?
b
Thanks for replying! Well actually I found a workaround, by making
Page<T: Any>
instead of
Page<T>
it started to work as expected. I thought this would fix nullability but it also fixed the generics.
I can revert to the previous state if you want to investigate it
k
Hmm. OK. Interesting that the type bounds fixes it. That should probably be a bug, but there were a lot of little corner cases in there
b
to be honest we're investigating if Kotlin MP would be a good solution for us to have one shared "api client" library - but the more we dig the more we feel the "experimental" side of it 😛
k
Well, there’s a blended strategy you can use as well. You can write Swift extensions where useful, that kind of thing. The generics is limited by Objc, not Kotlin or Kotlin Native
Direct swift interop is generally desired, but won’t necessarily make everything better. Lack of value types, etc. No variance on generics. They’re all different languages that are trying to interop, but some limitations are difficult to avoid
👍 1