<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=""><div class="">I am updating from Xcode 8 to Xcode 9, still using Swift 3.</div><div class=""><br class=""></div><div class="">In my project I am getting warnings of the pattern:</div><div class=""><br class=""></div><font face="Menlo" class="">Unavailable instance method ‘compareQueryResult(_:toQueryResult:)’ was used to satisfy a requirement of protocol ‘ResultComparable’.</font><div class=""><br class=""></div><div class="">My project uses an Obj-C++ framework to wrap C++ and expose it in Obj-C.</div><div class=""><br class=""></div><div class=""><div class="">The instance method in question is declared and implemented in a number of Obj-C classes in this framework.</div></div><div class=""><br class=""></div><div class=""><font face="Menlo" class=""><font color="#ba2da2" class=""><span style="background-color: white;" class="">@interface</span></font> DocumentQuery: <font color="#4f8187" class=""><span style="background-color: white;" class="">Query</span></font> {</font></div><font face="Menlo" class="">&nbsp; &nbsp;- (<font color="#4f8187" class=""><span style="background-color: white;" class="">ComparisonResult</span></font>)compareQueryResult:(<font color="#4f8187" class=""><span style="background-color: white;" class="">DocumentResult</span></font>&nbsp;*)result1 toQueryResult:(<font color="#4f8187" class=""><span style="background-color: white;" class="">DocumentResult</span></font>&nbsp;*)result2;<br class=""></font><div class=""><font face="Menlo" class="">}</font></div><div class=""><font color="#ba2da2" face="Menlo" class=""><span style="background-color: white;" class="">@end</span></font></div><div class=""><font face="Menlo" class=""><br class=""></font></div><div class=""><font face="Menlo" class=""><font color="#ba2da2" class=""><span style="background-color: white;" class="">@interface</span></font> GroupQuery: <font color="#4f8187" class=""><span style="background-color: white;" class="">Query</span></font> {</font></div><div class=""><font face="Menlo" class="">&nbsp; &nbsp;- (<font color="#4f8187" class=""><span style="background-color: white;" class="">ComparisonResult</span></font>)compareQueryResult:(<font color="#4f8187" class=""><span style="background-color: white;" class="">GroupResult</span></font>&nbsp;*)result1 toQueryResult:(<font color="#4f8187" class=""><span style="background-color: white;" class="">GroupResult</span></font>&nbsp;*)result2;</font></div><div class=""><font face="Menlo" class="">}</font></div><div class=""><font color="#ba2da2" face="Menlo" class=""><span style="background-color: white;" class="">@end</span></font></div><div class=""><br class=""></div><div class=""><div class=""><br class=""></div></div><div class=""><br class=""></div><div class="">Another framework imports the Obj-C++ framework. In this framework the protocol is defined in Swift with an associated type:</div><div class=""><br class=""></div><font face="Menlo" class=""><font color="#ba2da2" class=""><span style="background-color: white;" class="">public</span></font>&nbsp;<font color="#ba2da2" class=""><span style="background-color: white;" class="">protocol</span></font>&nbsp;ResultComparable<br class="">{<br class="">&nbsp; &nbsp;&nbsp;<font color="#ba2da2" class=""><span style="background-color: white;" class="">associatedtype</span></font>&nbsp;ResultType<br class="">&nbsp; &nbsp;&nbsp;<font color="#ba2da2" class=""><span style="background-color: white;" class="">func</span></font>&nbsp;compareQueryResult(_&nbsp;r1:&nbsp;</font><span style="color: rgb(112, 61, 170); font-family: Menlo; background-color: rgb(255, 255, 255);" class="">ResultType</span><font face="Menlo" class="">, toQueryResult r2:&nbsp;</font><span style="color: rgb(112, 61, 170); font-family: Menlo; background-color: rgb(255, 255, 255);" class="">ResultType</span><font face="Menlo" class="">) -&gt;&nbsp;</font><font color="#703daa" face="Menlo" class=""><span style="background-color: white;" class="">ComparisonResult</span></font><font face="Menlo" class=""><br class="">}<br class=""><br class=""></font><div class=""><div class="">And conformance is declared:</div><div class=""><br class=""></div><div style="font-size: 9px;" class=""><div style="margin: 0px; font-size: 12px; line-height: normal; font-family: Menlo; color: rgb(79, 129, 135); background-color: rgb(255, 255, 255);" class=""><span style="color: #ba2da2" class="">extension</span><span style="color: #000000" class=""> </span>DocumentQuery<span style="color: #000000" class="">: </span>ResultComparable<span style="color: #000000" class=""> {}</span></div><div style="margin: 0px; font-size: 12px; line-height: normal; font-family: Menlo; color: rgb(79, 129, 135); background-color: rgb(255, 255, 255);" class=""><span style="color: rgb(186, 45, 162);" class="">extension</span><span style="color: rgb(0, 0, 0);" class="">&nbsp;</span>GroupQuery<span style="color: rgb(0, 0, 0);" class="">:&nbsp;</span>ResultComparable<span style="color: rgb(0, 0, 0);" class="">&nbsp;{}</span></div><div style="margin: 0px; font-size: 12px; line-height: normal; font-family: Menlo; color: rgb(79, 129, 135); background-color: rgb(255, 255, 255);" class=""><br class=""></div><div style="margin: 0px; font-size: 12px; line-height: normal; font-family: Menlo; color: rgb(79, 129, 135); background-color: rgb(255, 255, 255);" class=""><span style="color: rgb(0, 0, 0);" class=""><br class=""></span></div><div style="margin: 0px; font-size: 12px; line-height: normal; font-family: Menlo; color: rgb(79, 129, 135); background-color: rgb(255, 255, 255);" class=""><div style="color: rgb(0, 0, 0); font-family: Helvetica;" class="">This compiled without warnings in Xcode 8 / Swift 3, but they appear in Xcode 9 / Swift 3. Any help in understanding the issue and how to fix it would be greatly appreciated.</div><div style="color: rgb(0, 0, 0); font-family: Helvetica;" class=""><br class=""></div><div style="color: rgb(0, 0, 0); font-family: Helvetica;" class="">James</div></div><div style="margin: 0px; font-size: 12px; line-height: normal; font-family: Menlo; color: rgb(79, 129, 135); background-color: rgb(255, 255, 255);" class=""><br class=""></div></div></div></body></html>