-
Notifications
You must be signed in to change notification settings - Fork 10.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A unicode scalar initialization now errors about overflow since the Dec. 19 trunk snapshot #78371
Comments
Standalone reproducer — builds with the 12/16 snapshot, but gives the error above for the 12/19 and later toolchains: let lower: Unicode.Scalar = "a"
if lower == Unicode.Scalar(0x07FD) {
print("Y")
} else {
print("N")
} |
@xedin, I had built the last Dec. 22 snapshot tag before winter break natively on Android and it was exhibiting this issue, so I reverted your #63585 and rebuilt that compiler and this issue went away. It appears this issue is clearly a consequence of your pull, please advise on how we should approach this problem. |
Related to swiftlang/swift#78371, but doesn't need to be reverted after that issue is fixed.
Related to swiftlang/swift#78371, but doesn't need to be reverted after that issue is fixed.
Hello! Sorry I just got back from vacation. I think we should treat this as a regression and fix it in the solver. I took a quick look and it looks like we started preferring a concrete overload of |
* Work around change in integer literal inference Related to swiftlang/swift#78371, but doesn't need to be reverted after that issue is fixed. * Fix availability for capture tests
* Work around change in integer literal inference Related to swiftlang/swift#78371, but doesn't need to be reverted after that issue is fixed. * Fix availability for capture tests
…rators Resetting score to `0.1` is intended to make sure that the solver picks the outermost disjunction in literal chains like `1 + 2 + 3 ...` because that would provide context to the inner choices. Resolves: swiftlang#78371 Resolves: rdar://142105691
@finagolfin @natecook1000 got a fix for this - #78526 |
…rators Resetting score to `0.1` is intended to make sure that the solver picks the outermost disjunction in literal chains like `1 + 2 + 3 ...` because that would provide context to the inner choices. Resolves: swiftlang#78371 Resolves: rdar://142105691
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: