-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Some parser bugs #835
Comments
Thanks for these reports. Issues found with a fuzzer are very welcome. I'll work on fixing these. |
evanw
added a commit
that referenced
this issue
Feb 18, 2021
evanw
added a commit
that referenced
this issue
Feb 18, 2021
evanw
added a commit
that referenced
this issue
Feb 18, 2021
evanw
added a commit
that referenced
this issue
Feb 18, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I ran a fuzzer for a bit and found a few cases where esbuild incorrectly rejects valid programs.
If you'd prefer I not file issues found with a fuzzer, let me know.
Here the
in
grammar flag should get reset when entering template literals.arguments
can be referred to in computed property names in classes; it's inherited from the surrounding context.I assume that when
[
is encountered in the LHS of an assignment it is assumed to be an ArrayAssignmentPattern, and hence forbidden from having any elements after the...
one, but that assumption is not necessarily true:[
can also begin an array which is the object of a member assignment, as here. My first line here assigns the value of the first element inc
to theprop
field in the first element ofa
, if there are any such, or otherwise to theprop
field offallback
.It is technically legal to call
super()
in the parameters of the constructor in a derived class, not just the body. This example is a fun (if inscrutable) way to make a class which throws if you try tonew
it with any arguments.This one I doubt would ever actually come up. It only happens with
new
, and the binding is namedasync
, and when assigning to a property. But I'm including it for completeness. I assume it's an issue with the parsing of the hideous cover grammar for async arrow expressions.The text was updated successfully, but these errors were encountered: