-
Notifications
You must be signed in to change notification settings - Fork 200
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
fix(compiler): cannot chain ?? expressions #5987
Conversation
Thanks for opening this pull request! 🎉
|
Console preview environment is available at https://wing-console-pr-5987.fly.dev 🚀 Last Updated (UTC) 2024-03-18 21:31 |
BenchmarksComparison to Baseline ⬜⬜🟥⬜⬜⬜🟥⬜⬜⬜⬜⬜⬜
⬜ Within 1.5 standard deviations Benchmarks may vary outside of normal expectations, especially when running in GitHub Actions CI. Results
Last Updated (UTC) 2024-03-18 21:37 |
Signed-off-by: monada-bot[bot] <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Thanks for contributing, @Chriscbr! This PR will now be added to the merge queue, or immediately merged if |
Congrats! 🚀 This was released in Wing 0.61.17. |
Fixes #1875
This fixes the issue by updating the precedent rules so the operation is right-associative. For now, expressions like
a ?? b
ora ?? b ?? c
still have to return a non-optional value (like Rust's unwrap_or), but we can consider making it more flexible / open in the way that C# or Swift allows if appropriate in the future.Checklist
pr/e2e-full
label if this feature requires end-to-end testingBy submitting this pull request, I confirm that my contribution is made under the terms of the Wing Cloud Contribution License.