<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="">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><blockquote type="cite" class=""><div class="">On Mar 9, 2016, at 12:48 PM, Jon Shier via swift-users &lt;<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>&gt; 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&lt;U&gt;’ cannot depend on a type parameter” on this definition:<br class=""><br class="">class RepeatedNetworkOperation&lt;T, U where U: Decodable, U == U.DecodedType, U: Repeatable, T: RepeatableNetworkOperation&lt;U&gt;&gt;: RepeatedOperation&lt;T&gt; { … }<br class=""><br class="">where the relevant other classes are defined as:<br class=""><br class="">class InterruptibleNetworkOperation&lt;T: Decodable where T == T.DecodedType&gt;: GroupOperation { … }<br class="">class RepeatedOperation&lt;T where T: NSOperation&gt;: GroupOperation { … }<br class="">class RepeatableNetworkOperation&lt;T where T: Decodable, T == T.DecodedType, T: Repeatable&gt;: InterruptibleNetworkOperation&lt;T&gt;, 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="">https://lists.swift.org/mailman/listinfo/swift-users<br class=""></div></div></blockquote></div><br class=""></div></body></html>