<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 <<a href="mailto:swift-corelibs-dev@swift.org" class="">swift-corelibs-dev@swift.org</a>> 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=""> 1> import Foundation</div><div class=""> 2> "abc".range(of: "a")!.lowerBound..<"abc".range(of: "a")!.upperBound</div><div class="">$R0: Range<String.Index> = {</div><div class=""> lowerBound = {</div><div class=""> _compoundOffset = 0</div><div class=""> _cache = utf16</div><div class=""> }</div><div class=""> upperBound = {</div><div class=""> _compoundOffset = 4</div><div class=""> _cache = utf16</div><div class=""> }</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=""> 1> import Foundation </div><div class=""> 2> "abc".range(of: "a")!.lowerBound..<"abc".range(of: "a")!.upperBound </div><div class="">$R0: CountableRange<String.Index> = {</div><div class=""> lowerBound = {</div><div class=""> _compoundOffset = 0</div><div class=""> _cache = utf16</div><div class=""> }</div><div class=""> upperBound = {</div><div class=""> _compoundOffset = 4</div><div class=""> _cache = utf16</div><div class=""> }</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>