Good morning multiplatform trailblazers!!!
I have a very noob question but i get mixed signals from the Internet. I can read here and there it’s possible to have access to generics from swift code by activating the
Xobjc-generics
flag on the compiler. That being said i keep having my type erased on the swift side and have to deal with a
Any?
instead.
The type im trying to use is the
Result
type.
Do you have any idea if it’s possible?
Do I have to write my own
Either
type?
r
ribesg
02/21/2020, 3:25 PM
Kotlin generics and Objective-C generics aren’t completely compatible, so only a subset of what you can do in Kotlin can be converted to Objective-C. Swift is a little closer to Kotlin while still not 1-1, but in K/N we’re doing ObjC, not Swift anyway