skiptools / skip

Skip transpiler for creating SwiftUI apps for iOS and Android

Home Page:https://skip.tools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Conforming to a generic type with associated type error: Type parameter ID of 'Identifiable' has inconsistent values: Long, [Error type: Unresolved type for ID]

marcprux opened this issue · comments

The swift:

protocol SQLRow : Identifiable {
}

public struct DataItem : Identifiable {
    public typealias ID = Int64
    public let id: ID
    public init(id: ID) {
        self.id = id
    }
}

extension DataItem : SQLRow {
}

transpiles to the Kotlin:

class DataItem: Identifiable<Long>, SQLRow<ID>, MutableStruct {
    override val id: Long
}

internal interface SQLRow<ID>: Identifiable<ID> {
}

Which fails to compile:

Type parameter ID of 'Identifiable' has inconsistent values: Long, [Error type: Unresolved type for ID]
Screenshot 2023-11-18 at 09 40 21