Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
marcprux opened this issue Nov 18, 2023 · 0 comments

Comments

@marcprux
Copy link
Contributor

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant