You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If code in the form <identifier> <assignment operator> <identifier> "/" <eof> is passed to Boa, the code executes as if the "/" were not present; it should raise a SyntaxError.
This bug does not work if there are characters after the "/", including newlines or spaces. The "/" must be the last character in the input.
To Reproduce
In your shell, assuming GNU coreutils: echo -n 'let a, b; a = b /' > test.js; boa test.js
Note that echo -n is required to avoid a trailing newline.
Expected behavior
This code should throw a SyntaxError. The / character is unexpected and is not valid syntax.
Build environment (please complete the following information):
Additional context
This bug works with most if not all of the assignment operators. For example, neither a /= b / nor a += b / raise a SyntaxError despite being invalid JavaScript.
The text was updated successfully, but these errors were encountered:
Describe the bug
If code in the form
<identifier> <assignment operator> <identifier> "/" <eof>
is passed to Boa, the code executes as if the "/" were not present; it should raise a SyntaxError.This bug does not work if there are characters after the "/", including newlines or spaces. The "/" must be the last character in the input.
To Reproduce
In your shell, assuming GNU coreutils:
echo -n 'let a, b; a = b /' > test.js; boa test.js
Note that
echo -n
is required to avoid a trailing newline.Expected behavior
This code should throw a
SyntaxError
. The/
character is unexpected and is not valid syntax.Build environment (please complete the following information):
x86_64-unknown-linux-gnu
rustc 1.72.1 (d5c2e9c34 2023-09-13)
Additional context
This bug works with most if not all of the assignment operators. For example, neither
a /= b /
nora += b /
raise aSyntaxError
despite being invalid JavaScript.The text was updated successfully, but these errors were encountered: