Huh, this is not a great user experience ... I update to the latest Xcode (12.1) via the App Store, and I don't get the latest Swift / Standard Library?
Note that the REPL doesn't say anything about the target, so my REPL screenshot looks identical to yours except that the result is false instead of true.
I don't even know (without looking that up) why my target is
x86_64-apple-darwin19.6.0 rather than eg
or how I set it / update it.
My Software Update says "Your Mac is up to date - macOS Catalina 10.15.7 (19H2).
So how do I make sure I'm using an up to date Standard Library?
"Swift 5.3" apparently doesn't say anything at all about that ... Not even eg
"Apple Swift version 5.3 (swiftlang-1188.8.131.52 clang-1184.108.40.206)"
is enough to know that my Swift/Stdlib is the same as yours ...
I suppose that this is just one of the implications of the Swift standard library being shipped now with the OS. This function is not inlinable, so it doesn't matter what SDK you download. Your code will automatically pick up bug fixes for non-inlinable functions when running on an OS with a newer standard library. I guess in this case that means macOS 11 or later.
I guess so, which means that it's (almost) never enough to say eg
"In Swift x.y", to specify some specific behavior or functionality, you'll always have to say
"In Swift x.y on macOS version z"
Or is there a way to retrieve the version number of the Standard Library I'm using?
BTW, see (the details of) this related forum post.