<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Oct 5, 2017, at 13:42, David Zarzycki via swift-dev &lt;<a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Hello,<br class=""><br class="">As an experiment, I’d like to force the exclusivity checking logic to always error at compile time, rather than a mix of compile time and run time. Near as I can tell, there is no built in debugging logic to do this (not even to warn when dynamic checks are added). Am I missing something? Where would be the best place in the code to make the dynamic checker error/warning at compile time? Would a warning be useful to others? Or should I just keep this on a throwaway branch?<br class=""></div></div></blockquote></div><br class=""><div class="">It's worth noting that this is impossible in the general case:</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class="">// Library.swift</blockquote><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class="">public class Foo {</div><div class="">&nbsp; public var x: Int = 0</div><div class="">&nbsp; public init() {}</div><div class="">}</div><div class="">public func testExclusivity(_ a: Foo, _ b: Foo, by callback: (inout Int, inout Int) -&gt; Void) {</div><div class="">&nbsp; callback(&amp;a.x, &amp;b.x)</div><div class="">}</div></blockquote><br class=""><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class="">// Client.swift, compiled as a separate target</div><div class="">let foo = Foo()</div><div class="">testExclusivity(foo, foo) { $0 = 42; $1 = 8192 }</div></blockquote><div class=""><br class=""></div>That doesn't necessarily mean there aren't improvements to be made, but it might change your goals.<div class=""><br class=""></div><div class="">Jordan<br class=""><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><br class=""></div></blockquote></div></body></html>