Swift 5.2 Released

Swift 5.2 features improved compiler diagnostics and faster code completion.

Apple has announced the release of the latest version of its open-source programming language Swift 5.2.
 
The latest release features improved compiler diagnostics and faster code completion. 5.2 also offers increased reliability in debugging, improved handling of dependencies in the Swift Package Manager, and tooling improvements with Language Server Protocol and SwiftSyntax.
 
Also, there are a few new additions to the language that provide new capabilities for building expressive APIs.
 
The team behind Swift said that they have drastically improved the quality and precision of error messages in the Swift compiler. The new version also offers you faster completion by eliminating unnecessary type checking. It speeds-up code completion by 1.2 to 1.6 times, compared to Xcode 11.3.1.
 
For example, using an earlier version of Swift, you might be perplexed by the error message (a sample) as below
  1. error: binary operator '!=' cannot be applied to operands of type 'E' and '_'  
  2. if e != .three {  
  3. ~ ^ ~~~~~~  
Now using Swift 5.2, you’ll see the problem right away as below:
  1. error: type 'E' has no member 'three'  
  2. if e != .three {  
  3. ~^~~~~  
The team said that covering all platforms where Swift debugging is carried, LLDB is now more resilient in reconstructing type information for Swift programs from debug information. This resilience facilitates the debugger to use more information about Swift types.
 
To learn more you can visit the official announcement here.