hi, is it possible to use `kotlin.Result` on swift...
# multiplatform
r
hi, is it possible to use
kotlin.Result
on swift with generic? Seems generic is not recognized and when trying to get items on Swfit,
Any?
is the return type. In Kotlin
Copy code
class SampleClazz {
    fun funcThatReturnKotlinResult(): Result<Int> {
        return Result.success(10)
    }
}
In Swift,
Int
generic is not being recognized:
nope 3
🥲 1
n
Value classes such as
Result<T>
don't translate to Objective-C, and as such are represented as having the type
Any?
. This is a known limitation.
🆗 2
🥲 2
256 Views