<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><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="AppleMailSignature"><br></div><div id="AppleMailSignature">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">jordan_rose@apple.com</a>> wrote:<br><br></div><blockquote type="cite"><div><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"><div class="">It's actually the other way around: <i class="">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 class=""><br class=""></div><div class="">Jordan</div><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Sep 6, 2017, at 02:08, Howard Lovatt 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 dir="ltr" class="">Hi All,<div class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class="">Thanks in advance,</div><div class=""><br class=""></div><div class=""><div class=""><div class="gmail_signature" data-smartmail="gmail_signature"> -- Howard.<br class=""></div></div>
</div></div>
_______________________________________________<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">https://lists.swift.org/mailman/listinfo/swift-users</a><br class=""></div></blockquote></div><br class=""></div></blockquote></body></html>