<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="">Hi Ian,<div class=""><br class=""></div><div class="">I don’t think Max has put up that PR against the swift-corelibs-foundation implementation, but we should.</div><div class=""><br class=""></div><div class="">- Tony<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Aug 9, 2017, at 9:04 AM, Ian Partridge via swift-corelibs-dev &lt;<a href="mailto:swift-corelibs-dev@swift.org" class="">swift-corelibs-dev@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">I've noticed this current difference in behaviour.</div><div class=""><br class=""></div><div class="">Darwin:</div><div class=""><br class=""></div><div class=""><div class="">$ swift</div><div class="">Welcome to Apple Swift version 4.0-dev (LLVM 2dedb62a0b, Clang b9d76a314c, Swift 6b4756bd93). Type :help for assistance.</div><div class="">&nbsp; 1&gt; import Foundation</div><div class="">&nbsp; 2&gt; "abc".range(of: "a")!.lowerBound..&lt;"abc".range(of: "a")!.upperBound</div><div class="">$R0: Range&lt;String.Index&gt; = {</div><div class="">&nbsp; lowerBound = {</div><div class="">&nbsp; &nbsp; _compoundOffset = 0</div><div class="">&nbsp; &nbsp; _cache = utf16</div><div class="">&nbsp; }</div><div class="">&nbsp; upperBound = {</div><div class="">&nbsp; &nbsp; _compoundOffset = 4</div><div class="">&nbsp; &nbsp; _cache = utf16</div><div class="">&nbsp; }</div><div class="">}</div></div><div class=""><br class=""></div><div class="">Linux:</div><div class=""><br class=""></div><div class=""><div class="">$ swift</div><div class="">Welcome to Swift version 4.0-dev (LLVM 2dedb62a0b, Clang b9d76a314c, Swift 6b4756bd93). Type :help for assistance.</div><div class="">&nbsp; 1&gt; import Foundation&nbsp;</div><div class="">&nbsp; 2&gt; "abc".range(of: "a")!.lowerBound..&lt;"abc".range(of: "a")!.upperBound&nbsp;</div><div class="">$R0: CountableRange&lt;String.Index&gt; = {</div><div class="">&nbsp; lowerBound = {</div><div class="">&nbsp; &nbsp; _compoundOffset = 0</div><div class="">&nbsp; &nbsp; _cache = utf16</div><div class="">&nbsp; }</div><div class="">&nbsp; upperBound = {</div><div class="">&nbsp; &nbsp; _compoundOffset = 4</div><div class="">&nbsp; &nbsp; _cache = utf16</div><div class="">&nbsp; }</div><div class="">}</div></div><div class=""><br class=""></div><div class="">I think this might be because some changes made in the overlay (NSStringAPI.swift) haven't been ported across to swift-corelibs-foundation:</div><div class=""><br class=""></div><a href="https://github.com/apple/swift/commit/5f1c3f702189f8197e297479d464dc454330be80" class="">https://github.com/apple/swift/commit/5f1c3f702189f8197e297479d464dc454330be80</a><br class=""><br class="">Is my suspicion right, and is there any work in progress to bring this into sync before Swift 4?<div class=""><br class="">-- <br class="">Ian Partridge</div></div>
_______________________________________________<br class="">swift-corelibs-dev mailing list<br class=""><a href="mailto:swift-corelibs-dev@swift.org" class="">swift-corelibs-dev@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-corelibs-dev<br class=""></div></blockquote></div><br class=""></div></body></html>