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
Hello! There is a bug with compiling switch-when statements when there is if-then-else statement inside of it:
switch some_string when 'a' then console.log('a') when 'b' then if smth then console.log('smth') else console.log('smth else')
This will be compiled into this:
switch (some_string) { case 'a': console.log('a'); break; case 'b': if (smth) { console.log('smth'); } break; default: console.log('smth else'); }
instead of this:
switch (some_string) { case 'a': console.log('a'); break; case 'b': if (smth) { console.log('smth'); } console.log('smth else'); } }
But this code compiles as needed:
switch some_string when 'a' console.log('a') when 'b' if smth then console.log('smth') else console.log('smth else')
Thanks a lot!
The text was updated successfully, but these errors were encountered:
I'm afraid this is a duplicate of #2342.
Sorry, something went wrong.
No, no I did not, @github.
Oh, missed that. Thanks.
No branches or pull requests
Hello! There is a bug with compiling switch-when statements when there is if-then-else statement inside of it:
This will be compiled into this:
instead of this:
But this code compiles as needed:
Thanks a lot!
The text was updated successfully, but these errors were encountered: