A unicode scalar initialization now errors about overflow since the Dec. 19 trunk snapshot #78371
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler itself
init
Feature → declarations: Initializers
overload resolution
Area → compiler → type checker: Overload resolution (ranking)
potentially source breaking
type checker
Area → compiler: Semantic analysis
unexpected error
Bug: Unexpected error
Description
I can no longer build the
swift-experimental-string-processing
package on linux x86_64 or Android AArch64:Patching that call to force unwrap like so,
Unicode.Scalar(0x07FD)!
, now gets the compiler to choose the right overload that returns an optional and takes larger values to avoid this issue.Whether this build issue should be fixed in the compiler or the regex package depends on whether this was a conscious decision to break such code, which I'm guessing is a consequence of @xedin's #63585 that was finally merged last week.
Expected behavior
Builds fine with the prior trunk Dec. 16 snapshot and the latest 6.0 and 6.1 releases
Environment
Swift 6.2 on Linux x86_64 and Android AArch64
The text was updated successfully, but these errors were encountered: