Allow 'undefined' in let or const declaration#639
Merged
bnoordhuis merged 1 commit intoquickjs-ng:masterfrom Oct 29, 2024
Merged
Allow 'undefined' in let or const declaration#639bnoordhuis merged 1 commit intoquickjs-ng:masterfrom
bnoordhuis merged 1 commit intoquickjs-ng:masterfrom
Conversation
bnoordhuis
commented
Oct 29, 2024
| && fd->scope_level == 1 | ||
| && fd->is_global_var | ||
| && !fd->module) { | ||
| return js_parse_error(s, "'undefined' already declared"); |
Contributor
Author
There was a problem hiding this comment.
This is the (abridged) version of what V8 reports, which felt a little more helpful to me than "invalid variable name"
chqrlie
reviewed
Oct 29, 2024
Except at the global scope of a classic script because... who knows, that's just how it is. Fixes: quickjs-ng#633
|
Any guesstimate when there might be a new release containing this fix? |
Contributor
|
I want to do one soon, I think it'd be good to finish the iterators work, not to have functions that throw with a TODO error. |
|
Great! Full support for all Iterator helper methods would indeed be well worth the wait, can use those as well 🙂 |
Contributor
|
No updates, I didn't have much time last week. Hoping to have some more this one. |
Contributor
|
Update, got started, hope to make the first PR this weekend. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Except at the global scope of a classic script because... who knows, that's just how it is.
Fixes: #633