You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an enum in Swift contains tuples must be transltated to Sealed classes, which is the closest in Kotlin.
Example:
Swift:
enum Barcode {
case upc(Int, Int, Int, Int)
case qrCode(named: String)
case empty
}
Koltin:
sealed class Barcode {
data class upc(val v1: Int, val v2: Int, val v3: Int, val v4: Int) : Barcode()
data class qrCode(val named: String) : Barcode()
object empty : Barcode()
}
The text was updated successfully, but these errors were encountered:
When an enum in Swift contains tuples must be transltated to Sealed classes, which is the closest in Kotlin.
Example:
Swift:
Koltin:
The text was updated successfully, but these errors were encountered: