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

Fix: stop execution when trying to slice an unsupported type #443

Merged
merged 1 commit into from
Feb 25, 2024

Conversation

mkuznets
Copy link
Contributor

This is a follow-up to #442

Add a missing return to actually stop script execution after detecting an invalid slice operation. Otherwise the execution continues with an invalid stack causing unexpected behaviour:

a := 123[-1:2]
a += 1  // runtime error: index out of range [-1]

@geseq geseq merged commit c461a7f into d5:master Feb 25, 2024
1 check passed
@mkuznets mkuznets deleted the mkuznets/terminate-not-indexable branch February 25, 2024 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants