We are happy to announce the release of Swift 6.2.4.
Install Swift Toolchain
- Install via Swiftly
swiftly install 6.2.4orswiftly install latest - Download toolchain directly from Install Swift | Swift.org
- Docker images will be available on hub.docker.com/_/swift soon (PR#20933).
- Xcode 26.3 contains Swift 6.2.4
Release Notes
- Swift
-
PR#86114 Fixed an issue that could result in some
for-inloops that iterate over a variadic generic types and usecontinueorbreakstatements to crash at runtime due to the compiler choosing incorrect jump destinations. -
PR#86112
nonisolated(nonsending)isolation is now transferred from the context to closures that don’t otherwise assume parent isolation. In particular, this includes closures passed to@Sendableparameters and allows to avoid unnecessary isolation switches.For example:
-
@MainActor func test(_: nonisolated(nonsending) @Sendable () async -> Void) async {}
await test {
// The closure doesn't leave `@MainActor`.
}
-
Swift Package Manager
- Performance improvements when building a target (or depending on a target) that contains a large number of explicitly declared sources.
- Better handling of default traits enablement across dependencies.
-
swift-corelibs-foundation
- PR#5287 Fixed a buffer overflow issue in
NSStringwith improved bounds checking
- PR#5287 Fixed a buffer overflow issue in
-
swift-format
- PR#1124
nonisolated(nonsending)type modifier is now correctly formatted
- PR#1124