hello have func pagination messages. class func listmessages() -> (int, int, ([chatitemprotocol]) -> void) { let service = messageservice() func list(count: int, offset: int, comp:([chatitemprotocol]) -> void) { let params : [string : anyobject] = ["offset" : offset, "limit" : count] service.listmessagesforroom(params) { (messages) in comp(messages.map({$0})) } } return list } and have error : cannot convert return expression of type '(int, offset: int, comp: ([chatitemprotocol]) -> void) -> ()' return type '(int, int, ([chatitemprotocol]) -> void)' (aka '(int, int, array<chatitemprotocol> -> ())') listmessages(...) expects following tuple return type (int, int, ([chatitemprotocol]) -> void) the function list(...) , on other hand, uses above argument implicitly contain void (/empty tuple type () ) return type. i.e., full signature lis...
Comments
Post a Comment