Skip to content

repl: fix generator function preprocessing

Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

repl

Description of change

Function declarations in the REPL are preprocessed into variable declarations before being evaluated. However, the preprocessing logic did not account for the star in a generator function declaration, which caused the preprocessor to output invalid syntax in some circumstances.

Fixes: https://github.com/nodejs/node/issues/9850

Merge request reports

Loading