<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Slava:<div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>I won’t be able to test my actual code, as the Operations and Alamofire libraries haven’t been updated for Swift 3 (which I wouldn’t expect), but I’ll try to put together a test cast that is similar and see if it works? When will this change be part of the package I can download for Xcode 7.3?</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Jon<br class=""><div><blockquote type="cite" class=""><div class="">On Mar 17, 2016, at 1:01 PM, Slava Pestov <<a href="mailto:spestov@apple.com" class="">spestov@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Jon,<div class=""><br class=""></div><div class="">You are right that this is a limitation of the current implementation in Swift 2.2. I may have fixed this recently in master:</div><div class=""><br class=""></div><div class=""><a href="https://github.com/apple/swift/commit/3aacf5d805768527b59d24e6da2a03911b3dd5b0" class="">https://github.com/apple/swift/commit/3aacf5d805768527b59d24e6da2a03911b3dd5b0</a></div><div class=""><br class=""></div><div class="">It would be great if you could try the latest compiler with your code.</div><div class=""><br class=""></div><div class="">Slava</div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Mar 9, 2016, at 12:48 PM, Jon Shier via swift-users <<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Swifters:<br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>I just encountered the error “Superclass constraint ‘RepeatableNetworkOperation<U>’ cannot depend on a type parameter” on this definition:<br class=""><br class="">class RepeatedNetworkOperation<T, U where U: Decodable, U == U.DecodedType, U: Repeatable, T: RepeatableNetworkOperation<U>>: RepeatedOperation<T> { … }<br class=""><br class="">where the relevant other classes are defined as:<br class=""><br class="">class InterruptibleNetworkOperation<T: Decodable where T == T.DecodedType>: GroupOperation { … }<br class="">class RepeatedOperation<T where T: NSOperation>: GroupOperation { … }<br class="">class RepeatableNetworkOperation<T where T: Decodable, T == T.DecodedType, T: Repeatable>: InterruptibleNetworkOperation<T>, Repeatable { … }<br class=""><br class="">I understand the error, but am I correct in thinking this is just a limitation of Swift’s current type and/or generics systems? I’m not a language theorist, but it seems perfectly reasonable that something like this should work. If it is just a limitation and not something I’m doing wrong, are there any suggestions for a workaround? The class I’m trying to write would really clean up my code.<br class=""><br class=""><br class="">Jon<br class=""><br class="">_______________________________________________<br class="">swift-users mailing list<br class=""><a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-users" class="">https://lists.swift.org/mailman/listinfo/swift-users</a><br class=""></div></div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""></div></body></html>