Skip to content
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

🖊️ Add error for else statement without if statement #5099 #5391

Merged
merged 3 commits into from
Apr 16, 2024

Conversation

boryanagoncharenko
Copy link
Collaborator

Fixes #5099
Add a custom error in levels 5-7 when there is an else statement when there is no if right before it.

How to test
Run the following snippets in levels 5-7 and check that the custom error is appropriate:

if answer is yes print 'great!'
print 'correct'
else print 'wrong'
else print 'wrong'

Copy link
Member

@jpelay jpelay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works!

Copy link
Contributor

mergify bot commented Apr 16, 2024

Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit d888124 into main Apr 16, 2024
12 checks passed
@mergify mergify bot deleted the else_error_5099 branch April 16, 2024 22:57
Copy link
Contributor

mergify bot commented Apr 16, 2024

Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

🪲 in level 5, error message should be improved
2 participants