Skip to content

Commit

Permalink
Fix syntax error from tc39#4164
Browse files Browse the repository at this point in the history
Function statements require a name.

See tc39#4166
  • Loading branch information
ptomato committed Jul 24, 2024
1 parent 29fe58b commit 368b39b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions harness/hidden-constructors.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ var AsyncGeneratorFunction;
var GeneratorFunction;

try {
AsyncFunction = Object.getPrototypeOf(new Function('async function () {}')).constructor;
AsyncFunction = Object.getPrototypeOf(new Function('async function dummy() {}')).constructor;
} catch(e) {}

try {
AsyncGeneratorFunction = Object.getPrototypeOf(new Function('async function* () {}')).constructor;
AsyncGeneratorFunction = Object.getPrototypeOf(new Function('async function* dummy() {}')).constructor;
} catch(e) {}

try {
GeneratorFunction = Object.getPrototypeOf(new Function('function* () {}')).constructor;
GeneratorFunction = Object.getPrototypeOf(new Function('function* dummy() {}')).constructor;
} catch(e) {}

0 comments on commit 368b39b

Please sign in to comment.