Skip to content
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

syntax error of /=/ when it's used in call expression arguments #2327

Closed
tunz opened this issue Oct 9, 2022 · 0 comments
Closed

syntax error of /=/ when it's used in call expression arguments #2327

tunz opened this issue Oct 9, 2022 · 0 comments
Labels
bug Something isn't working parser Issues surrounding the parser
Milestone

Comments

@tunz
Copy link
Contributor

tunz commented Oct 9, 2022

Describe the bug

Similar to #2148, when there is an RegExp literal /=/ as a call argument, boa raises an syntax error.

To Reproduce

This JavaScript code reproduces the issue:

fn(/=/);

Expected behavior

ReferenceError of fn is expected, but it shows an syntax error.

$ cat a.js
fn(/=/);
$ ./target/release/boa ./a.js
Uncaught "SyntaxError": "unexpected token '/=', primary expression at line 1, col 4"

Build environment (please complete the following information):

  • OS: macos
  • Version: main
  • Target triple: aarch64-apple-darwin
  • Rustc version: rustc 1.64.0 (a55dd71d5 2022-09-19)
@tunz tunz added the bug Something isn't working label Oct 9, 2022
@Razican Razican added the parser Issues surrounding the parser label Oct 21, 2022
@Razican Razican added this to the v0.17.0 milestone Oct 21, 2022
@bors bors bot closed this as completed in 904e422 Oct 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working parser Issues surrounding the parser
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants