We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
if
let
Compiling this code with 2 spaces between if and let
let b: num? = 1; if let z = b { assert(z == 1); }
Gives
$ wing compile main.w error: Expected block --> main.w:2:8 | 2 | if let z = b { | ^ Expected block error: Unexpected 'custom_type' --> main.w:2:13 | 2 | if let z = b { | ^ Unexpected 'custom_type' error: Unexpected 'identifier' --> main.w:3:3 | 3 | assert(z == 1); | ^^^^^^ Unexpected 'identifier' error: Unknown parser error --> main.w:4:1 | 4 | } | ^ Unknown parser error error: Unknown symbol "let" --> main.w:2:5 | 2 | if let z = b { | ^^^ Unknown symbol "let" error: Unknown symbol "z" --> main.w:3:10 | 3 | assert(z == 1); | ^ Unknown symbol "z" error: Unknown symbol "z" --> main.w:2:9 | 2 | if let z = b { | ^ Unknown symbol "z"
it works
Removing the extra space
Compiler
0.24.83
v18.16.1
Linux
No response
The text was updated successfully, but these errors were encountered:
fix(compiler): error when more than one space is placed between if …
1184705
…and `let` (#3960) @MarkMcCulloh, your review on PR #3888 made me realize that if I put more than one space between `if let`, it generates errors. I've updated the `if let` to work even with extra spaces. Closes #3959 ## Checklist - [x] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted) - [x] Description explains motivation and solution - [x] Tests added (always) - [ ] Docs updated (only required for features) - [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*.
Congrats! 🚀 This was released in Wing 0.26.0.
Sorry, something went wrong.
marciocadev
Successfully merging a pull request may close this issue.
I tried this:
Compiling this code with 2 spaces between
if
andlet
This happened:
Gives
I expected this:
it works
Is there a workaround?
Removing the extra space
Component
Compiler
Wing Version
0.24.83
Node.js Version
v18.16.1
Platform(s)
Linux
Anything else?
No response
Community Notes
The text was updated successfully, but these errors were encountered: