<div dir="ltr">Thanks Jordan. Turns out I had two problems:<div><br></div><div> 1. I had used ~> which is used in the library (but Xcode didn't tell me about the redefinition).</div><div> 2. Once Xcode had decided that there was an error it wouldn't clear; but when I quit Xcode and went back in it went away.</div><div><br></div><div>Thanks for your suggestion of logging a bug, reducing the problem to bug form really helped.</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"> -- Howard.<br></div></div>
<br><div class="gmail_quote">On 7 September 2017 at 07:36, Howard Lovatt via swift-users <span dir="ltr"><<a href="mailto:swift-users@swift.org" target="_blank">swift-users@swift.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><span class=""><div>I have a custom operator defined in a module and in my XCTest I import that module. In the tests the compiler says that the operator isn't defined. If I define the operator manually in the tests then it works. </div><div id="m_7495179821945173383AppleMailSignature"><br></div><div id="m_7495179821945173383AppleMailSignature">So what is going on?<br><br>-- Howard. </div><div><br>On 7 Sep 2017, at 3:45 am, Jordan Rose <<a href="mailto:jordan_rose@apple.com" target="_blank">jordan_rose@apple.com</a>> wrote:<br><br></div></span><div><div class="h5"><blockquote type="cite"><div><div>It's actually the other way around: <i>all</i> operator declarations are exported from a module, all the time, even if the functions that implement them aren't. This is probably a model we should improve, but it's been that way since Swift 1.</div><div><br></div><div>Jordan</div><br><div><br><blockquote type="cite"><div>On Sep 6, 2017, at 02:08, Howard Lovatt via swift-users <<a href="mailto:swift-users@swift.org" target="_blank">swift-users@swift.org</a>> wrote:</div><br class="m_7495179821945173383Apple-interchange-newline"><div><div dir="ltr">Hi All,<div><br></div><div>I am trying to use a custom operator imported from a module, unfortunately you can't add public to the operators definition and therefore it isn't exported from the module.</div><div><br></div><div>I can manually redefine the operator in the module where the operator is used, but that isn't very satisfactory - is there a better way?</div><div><br></div><div>Thanks in advance,</div><div><br></div><div><div><div class="m_7495179821945173383gmail_signature" data-smartmail="gmail_signature"> -- Howard.<br></div></div>
</div></div>
______________________________<wbr>_________________<br>swift-users mailing list<br><a href="mailto:swift-users@swift.org" target="_blank">swift-users@swift.org</a><br><a href="https://lists.swift.org/mailman/listinfo/swift-users" target="_blank">https://lists.swift.org/<wbr>mailman/listinfo/swift-users</a><br></div></blockquote></div><br></div></blockquote></div></div></div><br>______________________________<wbr>_________________<br>
swift-users mailing list<br>
<a href="mailto:swift-users@swift.org">swift-users@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-users" rel="noreferrer" target="_blank">https://lists.swift.org/<wbr>mailman/listinfo/swift-users</a><br>
<br></blockquote></div><br></div>