{"action":"created","issue":{"url":"https://api.github.com/repos/xmartlabs/Eureka/issues/1383","repository_url":"https://api.github.com/repos/xmartlabs/Eureka","labels_url":"https://api.github.com/repos/xmartlabs/Eureka/issues/1383/labels{/name}","comments_url":"https://api.github.com/repos/xmartlabs/Eureka/issues/1383/comments","events_url":"https://api.github.com/repos/xmartlabs/Eureka/issues/1383/events","html_url":"https://github.com/xmartlabs/Eureka/issues/1383","id":288563445,"number":1383,"title":"Compiler error for _ListCheckRow","user":{"login":"marbetschar","id":392542,"avatar_url":"https://avatars3.githubusercontent.com/u/392542?v=4","gravatar_id":"","url":"https://api.github.com/users/marbetschar","html_url":"https://github.com/marbetschar","followers_url":"https://api.github.com/users/marbetschar/followers","following_url":"https://api.github.com/users/marbetschar/following{/other_user}","gists_url":"https://api.github.com/users/marbetschar/gists{/gist_id}","starred_url":"https://api.github.com/users/marbetschar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marbetschar/subscriptions","organizations_url":"https://api.github.com/users/marbetschar/orgs","repos_url":"https://api.github.com/users/marbetschar/repos","events_url":"https://api.github.com/users/marbetschar/events{/privacy}","received_events_url":"https://api.github.com/users/marbetschar/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-01-15T11:30:08Z","updated_at":"2018-03-01T18:19:42Z","closed_at":"2018-03-01T18:19:42Z","author_association":"CONTRIBUTOR","body":"I'm not quite sure where to post this, because it's more a programming than a usage question. And as I looked at the [StackOverflow activity of this topic](https://stackoverflow.com/questions/48261972/compiler-error-for-custom-listcheckrow), I felt like it may be better to post here too. Feel free to close if unappropriate:\r\n\r\nI'm trying to create a custom row for Eureka forms. For this I'd like to customize the way a ListCheckCell looks like.\r\n\r\nIn order to achieve this goal I plan to use a generic `_ListCheckRow` in my code in order to allow developers to subclass it and throw a different styled one to my code.\r\n\r\nUnfortunately the Swift compiler complains. I'm especially interested in why it complains that `Cell` does not inherit from` ListCheckCell`...?\r\n\r\n`Col 12: type 'EditorViewController' does not conform to protocol 'TypedEditorViewController' Unable to infer associated type 'RowCell' for protocol 'TypedEditorViewController' (line 21, col 17) Inferred type 'Cell' (by matching requirement 'checkRow') is invalid: does not inherit from 'ListCheckCell' (line 25, col 13)`\r\n\r\nThe following snippet throws the error:\r\n\r\n```\r\nprotocol TypedEditorViewController{\r\n    associatedtype RowValue\r\n    associatedtype RowCell: ListCheckCell<RowValue>\r\n    var checkRow: _ListCheckRow<RowValue,RowCell>!{ get set }\r\n}\r\nopen class EditorViewController<T, Cell: ListCheckCell<T>>: TypedEditorViewController  {\r\n    public var checkRow: _ListCheckRow<T,Cell>!\r\n}\r\n```\r\n\r\nAnd here's the full code which does not want to compile. Any help is greaty appreciated. Please note this is code is simplified code for evaluating this scenario.\r\n\r\n```\r\nopen class RowOf<T> where T: Equatable{}\r\npublic protocol TypedCellType {\r\n    associatedtype Value: Equatable\r\n    var row: RowOf<Value>! { get set }\r\n}\r\npublic protocol CellType: TypedCellType {}\r\nopen class Cell<T>: TypedCellType where T: Equatable {\r\n    public typealias Value = T\r\n    public weak var row: RowOf<T>!\r\n}\r\nopen class Row<Cell: CellType>: RowOf<Cell.Value>{}\r\nopen class ListCheckCell<T: Equatable> : Cell<T>, CellType {}\r\n\r\nopen class _ListCheckRow<T, Cell: ListCheckCell<T>>: Row<Cell> {\r\n    public var selectableValue: T?\r\n}\r\n\r\nprotocol TypedEditorViewController{\r\n    associatedtype RowValue\r\n    associatedtype RowCell: ListCheckCell<RowValue>\r\n    var checkRow: _ListCheckRow<RowValue,RowCell>!{ get set }\r\n}\r\nopen class EditorViewController<T, Cell: ListCheckCell<T>>: TypedEditorViewController  {\r\n    public var checkRow: _ListCheckRow<T,Cell>!\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/xmartlabs/Eureka/issues/comments/369682614","html_url":"https://github.com/xmartlabs/Eureka/issues/1383#issuecomment-369682614","issue_url":"https://api.github.com/repos/xmartlabs/Eureka/issues/1383","id":369682614,"user":{"login":"marbetschar","id":392542,"avatar_url":"https://avatars3.githubusercontent.com/u/392542?v=4","gravatar_id":"","url":"https://api.github.com/users/marbetschar","html_url":"https://github.com/marbetschar","followers_url":"https://api.github.com/users/marbetschar/followers","following_url":"https://api.github.com/users/marbetschar/following{/other_user}","gists_url":"https://api.github.com/users/marbetschar/gists{/gist_id}","starred_url":"https://api.github.com/users/marbetschar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marbetschar/subscriptions","organizations_url":"https://api.github.com/users/marbetschar/orgs","repos_url":"https://api.github.com/users/marbetschar/repos","events_url":"https://api.github.com/users/marbetschar/events{/privacy}","received_events_url":"https://api.github.com/users/marbetschar/received_events","type":"User","site_admin":false},"created_at":"2018-03-01T18:19:42Z","updated_at":"2018-03-01T18:19:42Z","author_association":"CONTRIBUTOR","body":"@mtnbarreto not solved; but found a solution which works - that said, we can close this issue."}}
{"actor":{"display_login":"marbetschar"}}