-
Notifications
You must be signed in to change notification settings - Fork 39
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
disallow string range as of
label
#1147
disallow string range as of
label
#1147
Conversation
They were never explicitly supported, and using them resulted in undefined behaviour. Due to the lack of proper `nkError` propagation, the error has to be reported with `localReport` in `semBranchRange` for now.
* test cases not depending on compile-time execution are moved out of `static` blocks * `write` is replaced with `echo`. The `output` specification i updated accordingly
Only the tests for float slice-lists are moved, the now-illegal string slice-list tests are dropped.
Fixed a minor typo in the PR body, reviewing the change. |
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.
Error message looks good and the combined tests with extra coverage is much better.
/merge |
Merge requested by: @saem Contents after the first section break of the PR description has been removed and preserved below:
|
Summary
Using ranges of strings (e.g.,
"a".."c"
) inof
branches wasn'trejected, but since both the C and JavaScript backends expect them to
not exist, it's likely that string ranges being allowed is
unintentional. An error is now reported for string ranges used as
of
labels.
Details
rsemStringRangeNotAllowed
report is addedsemBranchRange
doesn't implement error propagationyet, so
localReport
is usedTests
tcasestmt
test is changed to work with all targetsvm/tcasestmt
is merged into thegeneral
tcasestmt
test