-
Notifications
You must be signed in to change notification settings - Fork 105
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
Allow 'undefined' in let or const declaration #639
Conversation
&& fd->scope_level == 1 | ||
&& fd->is_global_var | ||
&& !fd->module) { | ||
return js_parse_error(s, "'undefined' already declared"); |
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.
This is the (abridged) version of what V8 reports, which felt a little more helpful to me than "invalid variable name"
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.
Very nice!
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? |
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 🙂 |
No updates, I didn't have much time last week. Hoping to have some more this one. |
Update, got started, hope to make the first PR this weekend. |
Except at the global scope of a classic script because... who knows, that's just how it is.
Fixes: #633