mirror of
https://github.com/tc39/test262.git
synced 2025-07-27 07:54:41 +02:00
Generate tests
This commit is contained in:
parent
de15143976
commit
d74f58cddd
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-multiple-args.case
|
// - src/arguments/args-trailing-comma-multiple.case
|
||||||
// - src/arguments/default/cls-decl-gen-meth.template
|
// - src/arguments/default/cls-decl-gen-meth.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma should not increase the arguments.length, using multiple args (class declaration generator method)
|
description: A trailing comma should not increase the arguments.length, using multiple args (class declaration generator method)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-null.case
|
// - src/arguments/args-trailing-comma-null.case
|
||||||
// - src/arguments/default/cls-decl-gen-meth.template
|
// - src/arguments/default/cls-decl-gen-meth.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma after null should not increase the arguments.length (class declaration generator method)
|
description: A trailing comma after null should not increase the arguments.length (class declaration generator method)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-single-args.case
|
// - src/arguments/args-trailing-comma-single-args.case
|
||||||
// - src/arguments/default/cls-decl-gen-meth.template
|
// - src/arguments/default/cls-decl-gen-meth.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma should not increase the arguments.length, using a single arg (class declaration generator method)
|
description: A trailing comma should not increase the arguments.length, using a single arg (class declaration generator method)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-undefined.case
|
// - src/arguments/args-trailing-comma-undefined.case
|
||||||
// - src/arguments/default/cls-decl-gen-meth.template
|
// - src/arguments/default/cls-decl-gen-meth.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma after undefined should not increase the arguments.length (class declaration generator method)
|
description: A trailing comma after undefined should not increase the arguments.length (class declaration generator method)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-multiple-args.case
|
// - src/arguments/args-trailing-comma-multiple.case
|
||||||
// - src/arguments/default/cls-decl-gen-meth-static.template
|
// - src/arguments/default/cls-decl-gen-meth-static.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma should not increase the arguments.length, using multiple args (class declaration generator method)
|
description: A trailing comma should not increase the arguments.length, using multiple args (class declaration generator method)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-null.case
|
// - src/arguments/args-trailing-comma-null.case
|
||||||
// - src/arguments/default/cls-decl-gen-meth-static.template
|
// - src/arguments/default/cls-decl-gen-meth-static.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma after null should not increase the arguments.length (class declaration generator method)
|
description: A trailing comma after null should not increase the arguments.length (class declaration generator method)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-single-args.case
|
// - src/arguments/args-trailing-comma-single-args.case
|
||||||
// - src/arguments/default/cls-decl-gen-meth-static.template
|
// - src/arguments/default/cls-decl-gen-meth-static.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma should not increase the arguments.length, using a single arg (class declaration generator method)
|
description: A trailing comma should not increase the arguments.length, using a single arg (class declaration generator method)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-undefined.case
|
// - src/arguments/args-trailing-comma-undefined.case
|
||||||
// - src/arguments/default/cls-decl-gen-meth-static.template
|
// - src/arguments/default/cls-decl-gen-meth-static.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma after undefined should not increase the arguments.length (class declaration generator method)
|
description: A trailing comma after undefined should not increase the arguments.length (class declaration generator method)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-multiple-args.case
|
// - src/arguments/args-trailing-comma-multiple.case
|
||||||
// - src/arguments/default/cls-decl-meth.template
|
// - src/arguments/default/cls-decl-meth.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma should not increase the arguments.length, using multiple args (class declaration method)
|
description: A trailing comma should not increase the arguments.length, using multiple args (class declaration method)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-null.case
|
// - src/arguments/args-trailing-comma-null.case
|
||||||
// - src/arguments/default/cls-decl-meth.template
|
// - src/arguments/default/cls-decl-meth.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma after null should not increase the arguments.length (class declaration method)
|
description: A trailing comma after null should not increase the arguments.length (class declaration method)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-single-args.case
|
// - src/arguments/args-trailing-comma-single-args.case
|
||||||
// - src/arguments/default/cls-decl-meth.template
|
// - src/arguments/default/cls-decl-meth.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma should not increase the arguments.length, using a single arg (class declaration method)
|
description: A trailing comma should not increase the arguments.length, using a single arg (class declaration method)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-undefined.case
|
// - src/arguments/args-trailing-comma-undefined.case
|
||||||
// - src/arguments/default/cls-decl-meth.template
|
// - src/arguments/default/cls-decl-meth.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma after undefined should not increase the arguments.length (class declaration method)
|
description: A trailing comma after undefined should not increase the arguments.length (class declaration method)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-multiple-args.case
|
// - src/arguments/args-trailing-comma-multiple.case
|
||||||
// - src/arguments/default/cls-decl-meth-static.template
|
// - src/arguments/default/cls-decl-meth-static.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma should not increase the arguments.length, using multiple args (static class declaration method)
|
description: A trailing comma should not increase the arguments.length, using multiple args (static class declaration method)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-null.case
|
// - src/arguments/args-trailing-comma-null.case
|
||||||
// - src/arguments/default/cls-decl-meth-static.template
|
// - src/arguments/default/cls-decl-meth-static.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma after null should not increase the arguments.length (static class declaration method)
|
description: A trailing comma after null should not increase the arguments.length (static class declaration method)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-single-args.case
|
// - src/arguments/args-trailing-comma-single-args.case
|
||||||
// - src/arguments/default/cls-decl-meth-static.template
|
// - src/arguments/default/cls-decl-meth-static.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma should not increase the arguments.length, using a single arg (static class declaration method)
|
description: A trailing comma should not increase the arguments.length, using a single arg (static class declaration method)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-undefined.case
|
// - src/arguments/args-trailing-comma-undefined.case
|
||||||
// - src/arguments/default/cls-decl-meth-static.template
|
// - src/arguments/default/cls-decl-meth-static.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma after undefined should not increase the arguments.length (static class declaration method)
|
description: A trailing comma after undefined should not increase the arguments.length (static class declaration method)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-multiple-args.case
|
// - src/arguments/args-trailing-comma-multiple.case
|
||||||
// - src/arguments/default/cls-expr-gen-meth.template
|
// - src/arguments/default/cls-expr-gen-meth.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma should not increase the arguments.length, using multiple args (class expression generator method)
|
description: A trailing comma should not increase the arguments.length, using multiple args (class expression generator method)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-null.case
|
// - src/arguments/args-trailing-comma-null.case
|
||||||
// - src/arguments/default/cls-expr-gen-meth.template
|
// - src/arguments/default/cls-expr-gen-meth.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma after null should not increase the arguments.length (class expression generator method)
|
description: A trailing comma after null should not increase the arguments.length (class expression generator method)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-single-args.case
|
// - src/arguments/args-trailing-comma-single-args.case
|
||||||
// - src/arguments/default/cls-expr-gen-meth.template
|
// - src/arguments/default/cls-expr-gen-meth.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma should not increase the arguments.length, using a single arg (class expression generator method)
|
description: A trailing comma should not increase the arguments.length, using a single arg (class expression generator method)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-undefined.case
|
// - src/arguments/args-trailing-comma-undefined.case
|
||||||
// - src/arguments/default/cls-expr-gen-meth.template
|
// - src/arguments/default/cls-expr-gen-meth.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma after undefined should not increase the arguments.length (class expression generator method)
|
description: A trailing comma after undefined should not increase the arguments.length (class expression generator method)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-multiple-args.case
|
// - src/arguments/args-trailing-comma-multiple.case
|
||||||
// - src/arguments/default/cls-expr-gen-meth-static.template
|
// - src/arguments/default/cls-expr-gen-meth-static.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma should not increase the arguments.length, using multiple args (static class expression generator method)
|
description: A trailing comma should not increase the arguments.length, using multiple args (static class expression generator method)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-null.case
|
// - src/arguments/args-trailing-comma-null.case
|
||||||
// - src/arguments/default/cls-expr-gen-meth-static.template
|
// - src/arguments/default/cls-expr-gen-meth-static.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma after null should not increase the arguments.length (static class expression generator method)
|
description: A trailing comma after null should not increase the arguments.length (static class expression generator method)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-single-args.case
|
// - src/arguments/args-trailing-comma-single-args.case
|
||||||
// - src/arguments/default/cls-expr-gen-meth-static.template
|
// - src/arguments/default/cls-expr-gen-meth-static.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma should not increase the arguments.length, using a single arg (static class expression generator method)
|
description: A trailing comma should not increase the arguments.length, using a single arg (static class expression generator method)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-undefined.case
|
// - src/arguments/args-trailing-comma-undefined.case
|
||||||
// - src/arguments/default/cls-expr-gen-meth-static.template
|
// - src/arguments/default/cls-expr-gen-meth-static.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma after undefined should not increase the arguments.length (static class expression generator method)
|
description: A trailing comma after undefined should not increase the arguments.length (static class expression generator method)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-multiple-args.case
|
// - src/arguments/args-trailing-comma-multiple.case
|
||||||
// - src/arguments/default/cls-expr-meth.template
|
// - src/arguments/default/cls-expr-meth.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma should not increase the arguments.length, using multiple args (class expression method)
|
description: A trailing comma should not increase the arguments.length, using multiple args (class expression method)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-null.case
|
// - src/arguments/args-trailing-comma-null.case
|
||||||
// - src/arguments/default/cls-expr-meth.template
|
// - src/arguments/default/cls-expr-meth.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma after null should not increase the arguments.length (class expression method)
|
description: A trailing comma after null should not increase the arguments.length (class expression method)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-single-args.case
|
// - src/arguments/args-trailing-comma-single-args.case
|
||||||
// - src/arguments/default/cls-expr-meth.template
|
// - src/arguments/default/cls-expr-meth.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma should not increase the arguments.length, using a single arg (class expression method)
|
description: A trailing comma should not increase the arguments.length, using a single arg (class expression method)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-undefined.case
|
// - src/arguments/args-trailing-comma-undefined.case
|
||||||
// - src/arguments/default/cls-expr-meth.template
|
// - src/arguments/default/cls-expr-meth.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma after undefined should not increase the arguments.length (class expression method)
|
description: A trailing comma after undefined should not increase the arguments.length (class expression method)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-multiple-args.case
|
// - src/arguments/args-trailing-comma-multiple.case
|
||||||
// - src/arguments/default/cls-expr-meth-static.template
|
// - src/arguments/default/cls-expr-meth-static.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma should not increase the arguments.length, using multiple args (static class expression method)
|
description: A trailing comma should not increase the arguments.length, using multiple args (static class expression method)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-null.case
|
// - src/arguments/args-trailing-comma-null.case
|
||||||
// - src/arguments/default/cls-expr-meth-static.template
|
// - src/arguments/default/cls-expr-meth-static.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma after null should not increase the arguments.length (static class expression method)
|
description: A trailing comma after null should not increase the arguments.length (static class expression method)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-single-args.case
|
// - src/arguments/args-trailing-comma-single-args.case
|
||||||
// - src/arguments/default/cls-expr-meth-static.template
|
// - src/arguments/default/cls-expr-meth-static.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma should not increase the arguments.length, using a single arg (static class expression method)
|
description: A trailing comma should not increase the arguments.length, using a single arg (static class expression method)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-undefined.case
|
// - src/arguments/args-trailing-comma-undefined.case
|
||||||
// - src/arguments/default/cls-expr-meth-static.template
|
// - src/arguments/default/cls-expr-meth-static.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma after undefined should not increase the arguments.length (static class expression method)
|
description: A trailing comma after undefined should not increase the arguments.length (static class expression method)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-multiple-args.case
|
// - src/arguments/args-trailing-comma-multiple.case
|
||||||
// - src/arguments/default/func-decl.template
|
// - src/arguments/default/func-decl.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma should not increase the arguments.length, using multiple args (function declaration)
|
description: A trailing comma should not increase the arguments.length, using multiple args (function declaration)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-null.case
|
// - src/arguments/args-trailing-comma-null.case
|
||||||
// - src/arguments/default/func-decl.template
|
// - src/arguments/default/func-decl.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma after null should not increase the arguments.length (function declaration)
|
description: A trailing comma after null should not increase the arguments.length (function declaration)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-single-args.case
|
// - src/arguments/args-trailing-comma-single-args.case
|
||||||
// - src/arguments/default/func-decl.template
|
// - src/arguments/default/func-decl.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma should not increase the arguments.length, using a single arg (function declaration)
|
description: A trailing comma should not increase the arguments.length, using a single arg (function declaration)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-undefined.case
|
// - src/arguments/args-trailing-comma-undefined.case
|
||||||
// - src/arguments/default/func-decl.template
|
// - src/arguments/default/func-decl.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma after undefined should not increase the arguments.length (function declaration)
|
description: A trailing comma after undefined should not increase the arguments.length (function declaration)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-multiple-args.case
|
// - src/arguments/args-trailing-comma-multiple.case
|
||||||
// - src/arguments/default/func-expr.template
|
// - src/arguments/default/func-expr.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma should not increase the arguments.length, using multiple args (function expression)
|
description: A trailing comma should not increase the arguments.length, using multiple args (function expression)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-null.case
|
// - src/arguments/args-trailing-comma-null.case
|
||||||
// - src/arguments/default/func-expr.template
|
// - src/arguments/default/func-expr.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma after null should not increase the arguments.length (function expression)
|
description: A trailing comma after null should not increase the arguments.length (function expression)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-single-args.case
|
// - src/arguments/args-trailing-comma-single-args.case
|
||||||
// - src/arguments/default/func-expr.template
|
// - src/arguments/default/func-expr.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma should not increase the arguments.length, using a single arg (function expression)
|
description: A trailing comma should not increase the arguments.length, using a single arg (function expression)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-undefined.case
|
// - src/arguments/args-trailing-comma-undefined.case
|
||||||
// - src/arguments/default/func-expr.template
|
// - src/arguments/default/func-expr.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma after undefined should not increase the arguments.length (function expression)
|
description: A trailing comma after undefined should not increase the arguments.length (function expression)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-multiple-args.case
|
// - src/arguments/args-trailing-comma-multiple.case
|
||||||
// - src/arguments/default/gen-func-decl.template
|
// - src/arguments/default/gen-func-decl.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma should not increase the arguments.length, using multiple args (generator function declaration)
|
description: A trailing comma should not increase the arguments.length, using multiple args (generator function declaration)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-null.case
|
// - src/arguments/args-trailing-comma-null.case
|
||||||
// - src/arguments/default/gen-func-decl.template
|
// - src/arguments/default/gen-func-decl.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma after null should not increase the arguments.length (generator function declaration)
|
description: A trailing comma after null should not increase the arguments.length (generator function declaration)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-single-args.case
|
// - src/arguments/args-trailing-comma-single-args.case
|
||||||
// - src/arguments/default/gen-func-decl.template
|
// - src/arguments/default/gen-func-decl.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma should not increase the arguments.length, using a single arg (generator function declaration)
|
description: A trailing comma should not increase the arguments.length, using a single arg (generator function declaration)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-undefined.case
|
// - src/arguments/args-trailing-comma-undefined.case
|
||||||
// - src/arguments/default/gen-func-decl.template
|
// - src/arguments/default/gen-func-decl.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma after undefined should not increase the arguments.length (generator function declaration)
|
description: A trailing comma after undefined should not increase the arguments.length (generator function declaration)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-multiple-args.case
|
// - src/arguments/args-trailing-comma-multiple.case
|
||||||
// - src/arguments/default/gen-func-expr.template
|
// - src/arguments/default/gen-func-expr.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma should not increase the arguments.length, using multiple args (generator function expression)
|
description: A trailing comma should not increase the arguments.length, using multiple args (generator function expression)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-null.case
|
// - src/arguments/args-trailing-comma-null.case
|
||||||
// - src/arguments/default/gen-func-expr.template
|
// - src/arguments/default/gen-func-expr.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma after null should not increase the arguments.length (generator function expression)
|
description: A trailing comma after null should not increase the arguments.length (generator function expression)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-single-args.case
|
// - src/arguments/args-trailing-comma-single-args.case
|
||||||
// - src/arguments/default/gen-func-expr.template
|
// - src/arguments/default/gen-func-expr.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma should not increase the arguments.length, using a single arg (generator function expression)
|
description: A trailing comma should not increase the arguments.length, using a single arg (generator function expression)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-undefined.case
|
// - src/arguments/args-trailing-comma-undefined.case
|
||||||
// - src/arguments/default/gen-func-expr.template
|
// - src/arguments/default/gen-func-expr.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma after undefined should not increase the arguments.length (generator function expression)
|
description: A trailing comma after undefined should not increase the arguments.length (generator function expression)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-multiple-args.case
|
// - src/arguments/args-trailing-comma-multiple.case
|
||||||
// - src/arguments/default/gen-meth.template
|
// - src/arguments/default/gen-meth.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma should not increase the arguments.length, using multiple args (generator method)
|
description: A trailing comma should not increase the arguments.length, using multiple args (generator method)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-null.case
|
// - src/arguments/args-trailing-comma-null.case
|
||||||
// - src/arguments/default/gen-meth.template
|
// - src/arguments/default/gen-meth.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma after null should not increase the arguments.length (generator method)
|
description: A trailing comma after null should not increase the arguments.length (generator method)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-single-args.case
|
// - src/arguments/args-trailing-comma-single-args.case
|
||||||
// - src/arguments/default/gen-meth.template
|
// - src/arguments/default/gen-meth.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma should not increase the arguments.length, using a single arg (generator method)
|
description: A trailing comma should not increase the arguments.length, using a single arg (generator method)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-undefined.case
|
// - src/arguments/args-trailing-comma-undefined.case
|
||||||
// - src/arguments/default/gen-meth.template
|
// - src/arguments/default/gen-meth.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma after undefined should not increase the arguments.length (generator method)
|
description: A trailing comma after undefined should not increase the arguments.length (generator method)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-multiple-args.case
|
// - src/arguments/args-trailing-comma-multiple.case
|
||||||
// - src/arguments/default/meth.template
|
// - src/arguments/default/meth.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma should not increase the arguments.length, using multiple args (method)
|
description: A trailing comma should not increase the arguments.length, using multiple args (method)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-null.case
|
// - src/arguments/args-trailing-comma-null.case
|
||||||
// - src/arguments/default/meth.template
|
// - src/arguments/default/meth.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma after null should not increase the arguments.length (method)
|
description: A trailing comma after null should not increase the arguments.length (method)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-single-args.case
|
// - src/arguments/args-trailing-comma-single-args.case
|
||||||
// - src/arguments/default/meth.template
|
// - src/arguments/default/meth.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma should not increase the arguments.length, using a single arg (method)
|
description: A trailing comma should not increase the arguments.length, using a single arg (method)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/arguments/trailing-comma-undefined.case
|
// - src/arguments/args-trailing-comma-undefined.case
|
||||||
// - src/arguments/default/meth.template
|
// - src/arguments/default/meth.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma after undefined should not increase the arguments.length (method)
|
description: A trailing comma after undefined should not increase the arguments.length (method)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/function-forms/dflt-abrupt.case
|
// - src/function-forms/dflt-params-abrupt.case
|
||||||
// - src/function-forms/error/arrow-function.template
|
// - src/function-forms/error/arrow-function.template
|
||||||
/*---
|
/*---
|
||||||
description: Abrupt completion returned by evaluation of initializer (arrow function expression)
|
description: Abrupt completion returned by evaluation of initializer (arrow function expression)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/function-forms/dflt-arg-val-not-undefined.case
|
// - src/function-forms/dflt-params-arg-val-not-undefined.case
|
||||||
// - src/function-forms/default/arrow-function.template
|
// - src/function-forms/default/arrow-function.template
|
||||||
/*---
|
/*---
|
||||||
description: Use of intializer when argument value is not `undefined` (arrow function expression)
|
description: Use of intializer when argument value is not `undefined` (arrow function expression)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/function-forms/dflt-arg-val-undefined.case
|
// - src/function-forms/dflt-params-arg-val-undefined.case
|
||||||
// - src/function-forms/default/arrow-function.template
|
// - src/function-forms/default/arrow-function.template
|
||||||
/*---
|
/*---
|
||||||
description: Use of intializer when argument value is `undefined` (arrow function expression)
|
description: Use of intializer when argument value is `undefined` (arrow function expression)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/function-forms/dflt-duplicates.case
|
// - src/function-forms/dflt-params-duplicates.case
|
||||||
// - src/function-forms/syntax/arrow-function.template
|
// - src/function-forms/syntax/arrow-function.template
|
||||||
/*---
|
/*---
|
||||||
description: It is a Syntax Error if BoundNames of FormalParameters contains any duplicate elements. (arrow function expression)
|
description: It is a Syntax Error if BoundNames of FormalParameters contains any duplicate elements. (arrow function expression)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/function-forms/dflt-ref-later.case
|
// - src/function-forms/dflt-params-ref-later.case
|
||||||
// - src/function-forms/error/arrow-function.template
|
// - src/function-forms/error/arrow-function.template
|
||||||
/*---
|
/*---
|
||||||
description: Referencing a parameter that occurs later in the ParameterList (arrow function expression)
|
description: Referencing a parameter that occurs later in the ParameterList (arrow function expression)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/function-forms/dflt-ref-prior.case
|
// - src/function-forms/dflt-params-ref-prior.case
|
||||||
// - src/function-forms/default/arrow-function.template
|
// - src/function-forms/default/arrow-function.template
|
||||||
/*---
|
/*---
|
||||||
description: Referencing a parameter that occurs earlier in the ParameterList (arrow function expression)
|
description: Referencing a parameter that occurs earlier in the ParameterList (arrow function expression)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/function-forms/dflt-ref-self.case
|
// - src/function-forms/dflt-params-ref-self.case
|
||||||
// - src/function-forms/error/arrow-function.template
|
// - src/function-forms/error/arrow-function.template
|
||||||
/*---
|
/*---
|
||||||
description: Referencing a parameter from within its own initializer (arrow function expression)
|
description: Referencing a parameter from within its own initializer (arrow function expression)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/function-forms/dflt-rest.case
|
// - src/function-forms/dflt-params-rest.case
|
||||||
// - src/function-forms/syntax/arrow-function.template
|
// - src/function-forms/syntax/arrow-function.template
|
||||||
/*---
|
/*---
|
||||||
description: RestParameter does not support an initializer (arrow function expression)
|
description: RestParameter does not support an initializer (arrow function expression)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/function-forms/trailing-comma-dflt-param.case
|
// - src/function-forms/dflt-params-trailing-comma.case
|
||||||
// - src/function-forms/default/arrow-function.template
|
// - src/function-forms/default/arrow-function.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma should not increase the respective length, using default parameters (arrow function expression)
|
description: A trailing comma should not increase the respective length, using default parameters (arrow function expression)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/function-forms/trailing-comma-multiple-param.case
|
// - src/function-forms/params-trailing-comma-multiple.case
|
||||||
// - src/function-forms/default/arrow-function.template
|
// - src/function-forms/default/arrow-function.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma should not increase the respective length, using multiple parameters (arrow function expression)
|
description: A trailing comma should not increase the respective length, using multiple parameters (arrow function expression)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/function-forms/trailing-comma-single-param.case
|
// - src/function-forms/params-trailing-comma-single.case
|
||||||
// - src/function-forms/default/arrow-function.template
|
// - src/function-forms/default/arrow-function.template
|
||||||
/*---
|
/*---
|
||||||
description: A trailing comma should not increase the respective length, using a single parameter (arrow function expression)
|
description: A trailing comma should not increase the respective length, using a single parameter (arrow function expression)
|
@ -1,5 +1,5 @@
|
|||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/function-forms/trailing-comma-rest-early-error.case
|
// - src/function-forms/rest-params-trailing-comma-early-error.case
|
||||||
// - src/function-forms/syntax/arrow-function.template
|
// - src/function-forms/syntax/arrow-function.template
|
||||||
/*---
|
/*---
|
||||||
description: It's a syntax error if a FunctionRestParameter is followed by a trailing comma (arrow function expression)
|
description: It's a syntax error if a FunctionRestParameter is followed by a trailing comma (arrow function expression)
|
@ -0,0 +1,58 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/function-forms/dflt-params-abrupt.case
|
||||||
|
// - src/function-forms/error/async-arrow-function.template
|
||||||
|
/*---
|
||||||
|
description: Abrupt completion returned by evaluation of initializer (async arrow function expression)
|
||||||
|
esid: sec-async-arrow-function-definitions
|
||||||
|
features: [default-parameters]
|
||||||
|
flags: [generated, async]
|
||||||
|
info: |
|
||||||
|
14.7 Async Arrow Function Definitions
|
||||||
|
|
||||||
|
AsyncArrowFunction :
|
||||||
|
...
|
||||||
|
CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody
|
||||||
|
|
||||||
|
AsyncConciseBody :
|
||||||
|
{ AsyncFunctionBody }
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
Supplemental Syntax
|
||||||
|
|
||||||
|
When processing an instance of the production AsyncArrowFunction :
|
||||||
|
CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody the interpretation of
|
||||||
|
CoverCallExpressionAndAsyncArrowHead is refined using the following grammar:
|
||||||
|
|
||||||
|
AsyncArrowHead :
|
||||||
|
async ArrowFormalParameters
|
||||||
|
|
||||||
|
|
||||||
|
14.1.19 Runtime Semantics: IteratorBindingInitialization
|
||||||
|
|
||||||
|
FormalsList : FormalsList , FormalParameter
|
||||||
|
|
||||||
|
1. Let status be the result of performing IteratorBindingInitialization for
|
||||||
|
FormalsList using iteratorRecord and environment as the arguments.
|
||||||
|
2. ReturnIfAbrupt(status).
|
||||||
|
3. Return the result of performing IteratorBindingInitialization for
|
||||||
|
FormalParameter using iteratorRecord and environment as the arguments.
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
var callCount = 0;
|
||||||
|
var f;
|
||||||
|
f = async (_ = (function() { throw new Test262Error(); }())) => {
|
||||||
|
|
||||||
|
callCount = callCount + 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
f()
|
||||||
|
.then(_ => {
|
||||||
|
throw new Test262Error('function should not be resolved');
|
||||||
|
}, error => assert.sameValue(error.constructor, Test262Error))
|
||||||
|
.then(() => {
|
||||||
|
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||||
|
}, $DONE)
|
||||||
|
.then($DONE, $DONE);
|
@ -0,0 +1,77 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/function-forms/dflt-params-arg-val-not-undefined.case
|
||||||
|
// - src/function-forms/default/async-arrow-function.template
|
||||||
|
/*---
|
||||||
|
description: Use of intializer when argument value is not `undefined` (async arrow function expression)
|
||||||
|
esid: sec-async-arrow-function-definitions
|
||||||
|
features: [default-parameters]
|
||||||
|
flags: [generated, async]
|
||||||
|
info: |
|
||||||
|
14.7 Async Arrow Function Definitions
|
||||||
|
|
||||||
|
AsyncArrowFunction :
|
||||||
|
...
|
||||||
|
CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody
|
||||||
|
|
||||||
|
AsyncConciseBody :
|
||||||
|
{ AsyncFunctionBody }
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
Supplemental Syntax
|
||||||
|
|
||||||
|
When processing an instance of the production AsyncArrowFunction :
|
||||||
|
CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody the interpretation of
|
||||||
|
CoverCallExpressionAndAsyncArrowHead is refined using the following grammar:
|
||||||
|
|
||||||
|
AsyncArrowHead :
|
||||||
|
async ArrowFormalParameters
|
||||||
|
|
||||||
|
|
||||||
|
14.1.19 Runtime Semantics: IteratorBindingInitialization
|
||||||
|
|
||||||
|
FormalsList : FormalsList , FormalParameter
|
||||||
|
|
||||||
|
[...]
|
||||||
|
23. Let iteratorRecord be Record {[[Iterator]]:
|
||||||
|
CreateListIterator(argumentsList), [[Done]]: false}.
|
||||||
|
24. If hasDuplicates is true, then
|
||||||
|
[...]
|
||||||
|
25. Else,
|
||||||
|
a. Perform ? IteratorBindingInitialization for formals with
|
||||||
|
iteratorRecord and env as arguments.
|
||||||
|
[...]
|
||||||
|
|
||||||
|
---*/
|
||||||
|
var obj = {};
|
||||||
|
var falseCount = 0;
|
||||||
|
var stringCount = 0;
|
||||||
|
var nanCount = 0;
|
||||||
|
var zeroCount = 0;
|
||||||
|
var nullCount = 0;
|
||||||
|
var objCount = 0;
|
||||||
|
|
||||||
|
|
||||||
|
var callCount = 0;
|
||||||
|
|
||||||
|
// Stores a reference `ref` for case evaluation
|
||||||
|
var ref = async (aFalse = falseCount +=1, aString = stringCount += 1, aNaN = nanCount += 1, a0 = zeroCount += 1, aNull = nullCount += 1, aObj = objCount +=1) => {
|
||||||
|
assert.sameValue(aFalse, false);
|
||||||
|
assert.sameValue(aString, '');
|
||||||
|
assert.sameValue(aNaN, NaN);
|
||||||
|
assert.sameValue(a0, 0);
|
||||||
|
assert.sameValue(aNull, null);
|
||||||
|
assert.sameValue(aObj, obj);
|
||||||
|
callCount = callCount + 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
ref(false, '', NaN, 0, null, obj).then(() => {
|
||||||
|
assert.sameValue(callCount, 1, 'async arrow function invoked exactly once')
|
||||||
|
}).then($DONE, $DONE);
|
||||||
|
|
||||||
|
assert.sameValue(falseCount, 0, 'initializer not evaluated: false');
|
||||||
|
assert.sameValue(stringCount, 0, 'initializer not evaluated: string');
|
||||||
|
assert.sameValue(nanCount, 0, 'initializer not evaluated: NaN');
|
||||||
|
assert.sameValue(zeroCount, 0, 'initializer not evaluated: 0');
|
||||||
|
assert.sameValue(nullCount, 0, 'initializer not evaluated: null');
|
||||||
|
assert.sameValue(objCount, 0, 'initializer not evaluated: object');
|
@ -0,0 +1,60 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/function-forms/dflt-params-arg-val-undefined.case
|
||||||
|
// - src/function-forms/default/async-arrow-function.template
|
||||||
|
/*---
|
||||||
|
description: Use of intializer when argument value is `undefined` (async arrow function expression)
|
||||||
|
esid: sec-async-arrow-function-definitions
|
||||||
|
features: [default-parameters]
|
||||||
|
flags: [generated, async]
|
||||||
|
info: |
|
||||||
|
14.7 Async Arrow Function Definitions
|
||||||
|
|
||||||
|
AsyncArrowFunction :
|
||||||
|
...
|
||||||
|
CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody
|
||||||
|
|
||||||
|
AsyncConciseBody :
|
||||||
|
{ AsyncFunctionBody }
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
Supplemental Syntax
|
||||||
|
|
||||||
|
When processing an instance of the production AsyncArrowFunction :
|
||||||
|
CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody the interpretation of
|
||||||
|
CoverCallExpressionAndAsyncArrowHead is refined using the following grammar:
|
||||||
|
|
||||||
|
AsyncArrowHead :
|
||||||
|
async ArrowFormalParameters
|
||||||
|
|
||||||
|
|
||||||
|
14.1.19 Runtime Semantics: IteratorBindingInitialization
|
||||||
|
|
||||||
|
FormalsList : FormalsList , FormalParameter
|
||||||
|
|
||||||
|
[...]
|
||||||
|
23. Let iteratorRecord be Record {[[Iterator]]:
|
||||||
|
CreateListIterator(argumentsList), [[Done]]: false}.
|
||||||
|
24. If hasDuplicates is true, then
|
||||||
|
[...]
|
||||||
|
25. Else,
|
||||||
|
a. Perform ? IteratorBindingInitialization for formals with
|
||||||
|
iteratorRecord and env as arguments.
|
||||||
|
[...]
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
var callCount = 0;
|
||||||
|
|
||||||
|
// Stores a reference `ref` for case evaluation
|
||||||
|
var ref = async (fromLiteral = 23, fromExpr = 45, fromHole = 99) => {
|
||||||
|
assert.sameValue(fromLiteral, 23);
|
||||||
|
assert.sameValue(fromExpr, 45);
|
||||||
|
assert.sameValue(fromHole, 99);
|
||||||
|
callCount = callCount + 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
ref(undefined, void 0).then(() => {
|
||||||
|
assert.sameValue(callCount, 1, 'async arrow function invoked exactly once')
|
||||||
|
}).then($DONE, $DONE);
|
@ -0,0 +1,51 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/function-forms/dflt-params-duplicates.case
|
||||||
|
// - src/function-forms/syntax/async-arrow-function.template
|
||||||
|
/*---
|
||||||
|
description: It is a Syntax Error if BoundNames of FormalParameters contains any duplicate elements. (async arrow function expression)
|
||||||
|
esid: sec-async-arrow-function-definitions
|
||||||
|
features: [default-parameters]
|
||||||
|
flags: [generated]
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
info: |
|
||||||
|
14.7 Async Arrow Function Definitions
|
||||||
|
|
||||||
|
AsyncArrowFunction :
|
||||||
|
...
|
||||||
|
CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody
|
||||||
|
|
||||||
|
AsyncConciseBody :
|
||||||
|
{ AsyncFunctionBody }
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
Supplemental Syntax
|
||||||
|
|
||||||
|
When processing an instance of the production AsyncArrowFunction :
|
||||||
|
CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody the interpretation of
|
||||||
|
CoverCallExpressionAndAsyncArrowHead is refined using the following grammar:
|
||||||
|
|
||||||
|
AsyncArrowHead :
|
||||||
|
async ArrowFormalParameters
|
||||||
|
|
||||||
|
14.1.2 Static Semantics: Early Errors
|
||||||
|
|
||||||
|
StrictFormalParameters : FormalParameters
|
||||||
|
|
||||||
|
- It is a Syntax Error if BoundNames of FormalParameters contains any
|
||||||
|
duplicate elements.
|
||||||
|
|
||||||
|
FormalParameters : FormalParameterList
|
||||||
|
|
||||||
|
- It is a Syntax Error if IsSimpleParameterList of FormalParameterList is
|
||||||
|
false and BoundNames of FormalParameterList contains any duplicate
|
||||||
|
elements.
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
(async (x = 0, x) => {
|
||||||
|
|
||||||
|
});
|
@ -0,0 +1,59 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/function-forms/dflt-params-ref-later.case
|
||||||
|
// - src/function-forms/error/async-arrow-function.template
|
||||||
|
/*---
|
||||||
|
description: Referencing a parameter that occurs later in the ParameterList (async arrow function expression)
|
||||||
|
esid: sec-async-arrow-function-definitions
|
||||||
|
features: [default-parameters]
|
||||||
|
flags: [generated, async]
|
||||||
|
info: |
|
||||||
|
14.7 Async Arrow Function Definitions
|
||||||
|
|
||||||
|
AsyncArrowFunction :
|
||||||
|
...
|
||||||
|
CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody
|
||||||
|
|
||||||
|
AsyncConciseBody :
|
||||||
|
{ AsyncFunctionBody }
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
Supplemental Syntax
|
||||||
|
|
||||||
|
When processing an instance of the production AsyncArrowFunction :
|
||||||
|
CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody the interpretation of
|
||||||
|
CoverCallExpressionAndAsyncArrowHead is refined using the following grammar:
|
||||||
|
|
||||||
|
AsyncArrowHead :
|
||||||
|
async ArrowFormalParameters
|
||||||
|
|
||||||
|
|
||||||
|
14.1.19 Runtime Semantics: IteratorBindingInitialization
|
||||||
|
|
||||||
|
FormalsList : FormalsList , FormalParameter
|
||||||
|
|
||||||
|
1. Let status be the result of performing IteratorBindingInitialization for
|
||||||
|
FormalsList using iteratorRecord and environment as the arguments.
|
||||||
|
2. ReturnIfAbrupt(status).
|
||||||
|
3. Return the result of performing IteratorBindingInitialization for
|
||||||
|
FormalParameter using iteratorRecord and environment as the arguments.
|
||||||
|
|
||||||
|
---*/
|
||||||
|
var x = 0;
|
||||||
|
|
||||||
|
|
||||||
|
var callCount = 0;
|
||||||
|
var f;
|
||||||
|
f = async (x = y, y) => {
|
||||||
|
|
||||||
|
callCount = callCount + 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
f()
|
||||||
|
.then(_ => {
|
||||||
|
throw new Test262Error('function should not be resolved');
|
||||||
|
}, error => assert.sameValue(error.constructor, ReferenceError))
|
||||||
|
.then(() => {
|
||||||
|
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||||
|
}, $DONE)
|
||||||
|
.then($DONE, $DONE);
|
@ -0,0 +1,57 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/function-forms/dflt-params-ref-prior.case
|
||||||
|
// - src/function-forms/default/async-arrow-function.template
|
||||||
|
/*---
|
||||||
|
description: Referencing a parameter that occurs earlier in the ParameterList (async arrow function expression)
|
||||||
|
esid: sec-async-arrow-function-definitions
|
||||||
|
features: [default-parameters]
|
||||||
|
flags: [generated, async]
|
||||||
|
info: |
|
||||||
|
14.7 Async Arrow Function Definitions
|
||||||
|
|
||||||
|
AsyncArrowFunction :
|
||||||
|
...
|
||||||
|
CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody
|
||||||
|
|
||||||
|
AsyncConciseBody :
|
||||||
|
{ AsyncFunctionBody }
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
Supplemental Syntax
|
||||||
|
|
||||||
|
When processing an instance of the production AsyncArrowFunction :
|
||||||
|
CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody the interpretation of
|
||||||
|
CoverCallExpressionAndAsyncArrowHead is refined using the following grammar:
|
||||||
|
|
||||||
|
AsyncArrowHead :
|
||||||
|
async ArrowFormalParameters
|
||||||
|
|
||||||
|
|
||||||
|
14.1.19 Runtime Semantics: IteratorBindingInitialization
|
||||||
|
|
||||||
|
FormalsList : FormalsList , FormalParameter
|
||||||
|
|
||||||
|
1. Let status be the result of performing IteratorBindingInitialization for
|
||||||
|
FormalsList using iteratorRecord and environment as the arguments.
|
||||||
|
2. ReturnIfAbrupt(status).
|
||||||
|
3. Return the result of performing IteratorBindingInitialization for
|
||||||
|
FormalParameter using iteratorRecord and environment as the arguments.
|
||||||
|
|
||||||
|
---*/
|
||||||
|
var x = 0;
|
||||||
|
|
||||||
|
|
||||||
|
var callCount = 0;
|
||||||
|
|
||||||
|
// Stores a reference `ref` for case evaluation
|
||||||
|
var ref = async (x, y = x, z = y) => {
|
||||||
|
assert.sameValue(x, 3, 'first argument value');
|
||||||
|
assert.sameValue(y, 3, 'second argument value');
|
||||||
|
assert.sameValue(z, 3, 'third argument value');
|
||||||
|
callCount = callCount + 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
ref(3).then(() => {
|
||||||
|
assert.sameValue(callCount, 1, 'async arrow function invoked exactly once')
|
||||||
|
}).then($DONE, $DONE);
|
@ -0,0 +1,59 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/function-forms/dflt-params-ref-self.case
|
||||||
|
// - src/function-forms/error/async-arrow-function.template
|
||||||
|
/*---
|
||||||
|
description: Referencing a parameter from within its own initializer (async arrow function expression)
|
||||||
|
esid: sec-async-arrow-function-definitions
|
||||||
|
features: [default-parameters]
|
||||||
|
flags: [generated, async]
|
||||||
|
info: |
|
||||||
|
14.7 Async Arrow Function Definitions
|
||||||
|
|
||||||
|
AsyncArrowFunction :
|
||||||
|
...
|
||||||
|
CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody
|
||||||
|
|
||||||
|
AsyncConciseBody :
|
||||||
|
{ AsyncFunctionBody }
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
Supplemental Syntax
|
||||||
|
|
||||||
|
When processing an instance of the production AsyncArrowFunction :
|
||||||
|
CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody the interpretation of
|
||||||
|
CoverCallExpressionAndAsyncArrowHead is refined using the following grammar:
|
||||||
|
|
||||||
|
AsyncArrowHead :
|
||||||
|
async ArrowFormalParameters
|
||||||
|
|
||||||
|
|
||||||
|
14.1.19 Runtime Semantics: IteratorBindingInitialization
|
||||||
|
|
||||||
|
FormalsList : FormalsList , FormalParameter
|
||||||
|
|
||||||
|
1. Let status be the result of performing IteratorBindingInitialization for
|
||||||
|
FormalsList using iteratorRecord and environment as the arguments.
|
||||||
|
2. ReturnIfAbrupt(status).
|
||||||
|
3. Return the result of performing IteratorBindingInitialization for
|
||||||
|
FormalParameter using iteratorRecord and environment as the arguments.
|
||||||
|
|
||||||
|
---*/
|
||||||
|
var x = 0;
|
||||||
|
|
||||||
|
|
||||||
|
var callCount = 0;
|
||||||
|
var f;
|
||||||
|
f = async (x = x) => {
|
||||||
|
|
||||||
|
callCount = callCount + 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
f()
|
||||||
|
.then(_ => {
|
||||||
|
throw new Test262Error('function should not be resolved');
|
||||||
|
}, error => assert.sameValue(error.constructor, ReferenceError))
|
||||||
|
.then(() => {
|
||||||
|
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||||
|
}, $DONE)
|
||||||
|
.then($DONE, $DONE);
|
@ -0,0 +1,55 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/function-forms/dflt-params-rest.case
|
||||||
|
// - src/function-forms/syntax/async-arrow-function.template
|
||||||
|
/*---
|
||||||
|
description: RestParameter does not support an initializer (async arrow function expression)
|
||||||
|
esid: sec-async-arrow-function-definitions
|
||||||
|
features: [default-parameters]
|
||||||
|
flags: [generated]
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
info: |
|
||||||
|
14.7 Async Arrow Function Definitions
|
||||||
|
|
||||||
|
AsyncArrowFunction :
|
||||||
|
...
|
||||||
|
CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody
|
||||||
|
|
||||||
|
AsyncConciseBody :
|
||||||
|
{ AsyncFunctionBody }
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
Supplemental Syntax
|
||||||
|
|
||||||
|
When processing an instance of the production AsyncArrowFunction :
|
||||||
|
CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody the interpretation of
|
||||||
|
CoverCallExpressionAndAsyncArrowHead is refined using the following grammar:
|
||||||
|
|
||||||
|
AsyncArrowHead :
|
||||||
|
async ArrowFormalParameters
|
||||||
|
|
||||||
|
14.1 Function Definitions
|
||||||
|
|
||||||
|
Syntax
|
||||||
|
|
||||||
|
FunctionRestParameter[Yield] :
|
||||||
|
|
||||||
|
BindingRestElement[?Yield]
|
||||||
|
|
||||||
|
13.3.3 Destructuring Binding Patterns
|
||||||
|
|
||||||
|
Syntax
|
||||||
|
|
||||||
|
BindingRestElement[Yield] :
|
||||||
|
|
||||||
|
...BindingIdentifier[?Yield]
|
||||||
|
...BindingPattern[?Yield]
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
(async (...x = []) => {
|
||||||
|
|
||||||
|
});
|
@ -0,0 +1,51 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/function-forms/dflt-params-trailing-comma.case
|
||||||
|
// - src/function-forms/default/async-arrow-function.template
|
||||||
|
/*---
|
||||||
|
description: A trailing comma should not increase the respective length, using default parameters (async arrow function expression)
|
||||||
|
esid: sec-async-arrow-function-definitions
|
||||||
|
flags: [generated, async]
|
||||||
|
info: |
|
||||||
|
14.7 Async Arrow Function Definitions
|
||||||
|
|
||||||
|
AsyncArrowFunction :
|
||||||
|
...
|
||||||
|
CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody
|
||||||
|
|
||||||
|
AsyncConciseBody :
|
||||||
|
{ AsyncFunctionBody }
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
Supplemental Syntax
|
||||||
|
|
||||||
|
When processing an instance of the production AsyncArrowFunction :
|
||||||
|
CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody the interpretation of
|
||||||
|
CoverCallExpressionAndAsyncArrowHead is refined using the following grammar:
|
||||||
|
|
||||||
|
AsyncArrowHead :
|
||||||
|
async ArrowFormalParameters
|
||||||
|
|
||||||
|
|
||||||
|
Trailing comma in the parameters list
|
||||||
|
|
||||||
|
14.1 Function Definitions
|
||||||
|
|
||||||
|
FormalParameters[Yield, Await] : FormalParameterList[?Yield, ?Await] ,
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
var callCount = 0;
|
||||||
|
|
||||||
|
// Stores a reference `ref` for case evaluation
|
||||||
|
var ref = async (a, b = 39,) => {
|
||||||
|
assert.sameValue(a, 42);
|
||||||
|
assert.sameValue(b, 39);
|
||||||
|
callCount = callCount + 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
ref(42, undefined, 1).then(() => {
|
||||||
|
assert.sameValue(callCount, 1, 'async arrow function invoked exactly once')
|
||||||
|
}).then($DONE, $DONE);
|
||||||
|
|
||||||
|
assert.sameValue(ref.length, 1, 'length is properly set');
|
@ -0,0 +1,51 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/function-forms/params-trailing-comma-multiple.case
|
||||||
|
// - src/function-forms/default/async-arrow-function.template
|
||||||
|
/*---
|
||||||
|
description: A trailing comma should not increase the respective length, using multiple parameters (async arrow function expression)
|
||||||
|
esid: sec-async-arrow-function-definitions
|
||||||
|
flags: [generated, async]
|
||||||
|
info: |
|
||||||
|
14.7 Async Arrow Function Definitions
|
||||||
|
|
||||||
|
AsyncArrowFunction :
|
||||||
|
...
|
||||||
|
CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody
|
||||||
|
|
||||||
|
AsyncConciseBody :
|
||||||
|
{ AsyncFunctionBody }
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
Supplemental Syntax
|
||||||
|
|
||||||
|
When processing an instance of the production AsyncArrowFunction :
|
||||||
|
CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody the interpretation of
|
||||||
|
CoverCallExpressionAndAsyncArrowHead is refined using the following grammar:
|
||||||
|
|
||||||
|
AsyncArrowHead :
|
||||||
|
async ArrowFormalParameters
|
||||||
|
|
||||||
|
|
||||||
|
Trailing comma in the parameters list
|
||||||
|
|
||||||
|
14.1 Function Definitions
|
||||||
|
|
||||||
|
FormalParameters[Yield, Await] : FormalParameterList[?Yield, ?Await] ,
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
var callCount = 0;
|
||||||
|
|
||||||
|
// Stores a reference `ref` for case evaluation
|
||||||
|
var ref = async (a, b,) => {
|
||||||
|
assert.sameValue(a, 42);
|
||||||
|
assert.sameValue(b, 39);
|
||||||
|
callCount = callCount + 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
ref(42, 39, 1).then(() => {
|
||||||
|
assert.sameValue(callCount, 1, 'async arrow function invoked exactly once')
|
||||||
|
}).then($DONE, $DONE);
|
||||||
|
|
||||||
|
assert.sameValue(ref.length, 2, 'length is properly set');
|
@ -0,0 +1,50 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/function-forms/params-trailing-comma-single.case
|
||||||
|
// - src/function-forms/default/async-arrow-function.template
|
||||||
|
/*---
|
||||||
|
description: A trailing comma should not increase the respective length, using a single parameter (async arrow function expression)
|
||||||
|
esid: sec-async-arrow-function-definitions
|
||||||
|
flags: [generated, async]
|
||||||
|
info: |
|
||||||
|
14.7 Async Arrow Function Definitions
|
||||||
|
|
||||||
|
AsyncArrowFunction :
|
||||||
|
...
|
||||||
|
CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody
|
||||||
|
|
||||||
|
AsyncConciseBody :
|
||||||
|
{ AsyncFunctionBody }
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
Supplemental Syntax
|
||||||
|
|
||||||
|
When processing an instance of the production AsyncArrowFunction :
|
||||||
|
CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody the interpretation of
|
||||||
|
CoverCallExpressionAndAsyncArrowHead is refined using the following grammar:
|
||||||
|
|
||||||
|
AsyncArrowHead :
|
||||||
|
async ArrowFormalParameters
|
||||||
|
|
||||||
|
|
||||||
|
Trailing comma in the parameters list
|
||||||
|
|
||||||
|
14.1 Function Definitions
|
||||||
|
|
||||||
|
FormalParameters[Yield, Await] : FormalParameterList[?Yield, ?Await] ,
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
var callCount = 0;
|
||||||
|
|
||||||
|
// Stores a reference `ref` for case evaluation
|
||||||
|
var ref = async (a,) => {
|
||||||
|
assert.sameValue(a, 42);
|
||||||
|
callCount = callCount + 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
ref(42, 39).then(() => {
|
||||||
|
assert.sameValue(callCount, 1, 'async arrow function invoked exactly once')
|
||||||
|
}).then($DONE, $DONE);
|
||||||
|
|
||||||
|
assert.sameValue(ref.length, 1, 'length is properly set');
|
@ -0,0 +1,47 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/function-forms/rest-params-trailing-comma-early-error.case
|
||||||
|
// - src/function-forms/syntax/async-arrow-function.template
|
||||||
|
/*---
|
||||||
|
description: It's a syntax error if a FunctionRestParameter is followed by a trailing comma (async arrow function expression)
|
||||||
|
esid: sec-async-arrow-function-definitions
|
||||||
|
flags: [generated]
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
info: |
|
||||||
|
14.7 Async Arrow Function Definitions
|
||||||
|
|
||||||
|
AsyncArrowFunction :
|
||||||
|
...
|
||||||
|
CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody
|
||||||
|
|
||||||
|
AsyncConciseBody :
|
||||||
|
{ AsyncFunctionBody }
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
Supplemental Syntax
|
||||||
|
|
||||||
|
When processing an instance of the production AsyncArrowFunction :
|
||||||
|
CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody the interpretation of
|
||||||
|
CoverCallExpressionAndAsyncArrowHead is refined using the following grammar:
|
||||||
|
|
||||||
|
AsyncArrowHead :
|
||||||
|
async ArrowFormalParameters
|
||||||
|
|
||||||
|
Trailing comma in the parameters list
|
||||||
|
|
||||||
|
14.1 Function Definitions
|
||||||
|
|
||||||
|
FormalParameters[Yield, Await] :
|
||||||
|
[empty]
|
||||||
|
FunctionRestParameter[?Yield, ?Await]
|
||||||
|
FormalParameterList[?Yield, ?Await]
|
||||||
|
FormalParameterList[?Yield, ?Await] ,
|
||||||
|
FormalParameterList[?Yield, ?Await] , FunctionRestParameter[?Yield, ?Await]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
(async (...a,) => {
|
||||||
|
|
||||||
|
});
|
@ -0,0 +1,42 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/function-forms/dflt-params-abrupt.case
|
||||||
|
// - src/function-forms/error/async-func-expr-named.template
|
||||||
|
/*---
|
||||||
|
description: Abrupt completion returned by evaluation of initializer (async function named expression)
|
||||||
|
esid: sec-async-function-definitions
|
||||||
|
features: [default-parameters]
|
||||||
|
flags: [generated, async]
|
||||||
|
info: |
|
||||||
|
14.6 Async Function Definitions
|
||||||
|
|
||||||
|
AsyncFunctionExpression :
|
||||||
|
async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
14.1.19 Runtime Semantics: IteratorBindingInitialization
|
||||||
|
|
||||||
|
FormalsList : FormalsList , FormalParameter
|
||||||
|
|
||||||
|
1. Let status be the result of performing IteratorBindingInitialization for
|
||||||
|
FormalsList using iteratorRecord and environment as the arguments.
|
||||||
|
2. ReturnIfAbrupt(status).
|
||||||
|
3. Return the result of performing IteratorBindingInitialization for
|
||||||
|
FormalParameter using iteratorRecord and environment as the arguments.
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
var callCount = 0;
|
||||||
|
var f = async function f(_ = (function() { throw new Test262Error(); }())) {
|
||||||
|
|
||||||
|
callCount = callCount + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
f()
|
||||||
|
.then(_ => {
|
||||||
|
throw new Test262Error('function should not be resolved');
|
||||||
|
}, error => assert.sameValue(error.constructor, Test262Error))
|
||||||
|
.then(() => {
|
||||||
|
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||||
|
}, $DONE)
|
||||||
|
.then($DONE, $DONE);
|
@ -0,0 +1,63 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/function-forms/dflt-params-arg-val-not-undefined.case
|
||||||
|
// - src/function-forms/default/async-func-expr-named.template
|
||||||
|
/*---
|
||||||
|
description: Use of intializer when argument value is not `undefined` (async function named expression)
|
||||||
|
esid: sec-async-function-definitions
|
||||||
|
features: [default-parameters]
|
||||||
|
flags: [generated, async]
|
||||||
|
info: |
|
||||||
|
14.6 Async Function Definitions
|
||||||
|
|
||||||
|
AsyncFunctionExpression :
|
||||||
|
async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
14.1.19 Runtime Semantics: IteratorBindingInitialization
|
||||||
|
|
||||||
|
FormalsList : FormalsList , FormalParameter
|
||||||
|
|
||||||
|
[...]
|
||||||
|
23. Let iteratorRecord be Record {[[Iterator]]:
|
||||||
|
CreateListIterator(argumentsList), [[Done]]: false}.
|
||||||
|
24. If hasDuplicates is true, then
|
||||||
|
[...]
|
||||||
|
25. Else,
|
||||||
|
a. Perform ? IteratorBindingInitialization for formals with
|
||||||
|
iteratorRecord and env as arguments.
|
||||||
|
[...]
|
||||||
|
|
||||||
|
---*/
|
||||||
|
var obj = {};
|
||||||
|
var falseCount = 0;
|
||||||
|
var stringCount = 0;
|
||||||
|
var nanCount = 0;
|
||||||
|
var zeroCount = 0;
|
||||||
|
var nullCount = 0;
|
||||||
|
var objCount = 0;
|
||||||
|
|
||||||
|
|
||||||
|
var callCount = 0;
|
||||||
|
|
||||||
|
// Stores a reference `ref` for case evaluation
|
||||||
|
var ref;
|
||||||
|
ref = async function ref(aFalse = falseCount +=1, aString = stringCount += 1, aNaN = nanCount += 1, a0 = zeroCount += 1, aNull = nullCount += 1, aObj = objCount +=1) {
|
||||||
|
assert.sameValue(aFalse, false);
|
||||||
|
assert.sameValue(aString, '');
|
||||||
|
assert.sameValue(aNaN, NaN);
|
||||||
|
assert.sameValue(a0, 0);
|
||||||
|
assert.sameValue(aNull, null);
|
||||||
|
assert.sameValue(aObj, obj);
|
||||||
|
callCount = callCount + 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
ref(false, '', NaN, 0, null, obj).then(() => {
|
||||||
|
assert.sameValue(callCount, 1, 'function invoked exactly once');
|
||||||
|
}).then($DONE, $DONE);
|
||||||
|
|
||||||
|
assert.sameValue(falseCount, 0, 'initializer not evaluated: false');
|
||||||
|
assert.sameValue(stringCount, 0, 'initializer not evaluated: string');
|
||||||
|
assert.sameValue(nanCount, 0, 'initializer not evaluated: NaN');
|
||||||
|
assert.sameValue(zeroCount, 0, 'initializer not evaluated: 0');
|
||||||
|
assert.sameValue(nullCount, 0, 'initializer not evaluated: null');
|
||||||
|
assert.sameValue(objCount, 0, 'initializer not evaluated: object');
|
@ -0,0 +1,46 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/function-forms/dflt-params-arg-val-undefined.case
|
||||||
|
// - src/function-forms/default/async-func-expr-named.template
|
||||||
|
/*---
|
||||||
|
description: Use of intializer when argument value is `undefined` (async function named expression)
|
||||||
|
esid: sec-async-function-definitions
|
||||||
|
features: [default-parameters]
|
||||||
|
flags: [generated, async]
|
||||||
|
info: |
|
||||||
|
14.6 Async Function Definitions
|
||||||
|
|
||||||
|
AsyncFunctionExpression :
|
||||||
|
async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
14.1.19 Runtime Semantics: IteratorBindingInitialization
|
||||||
|
|
||||||
|
FormalsList : FormalsList , FormalParameter
|
||||||
|
|
||||||
|
[...]
|
||||||
|
23. Let iteratorRecord be Record {[[Iterator]]:
|
||||||
|
CreateListIterator(argumentsList), [[Done]]: false}.
|
||||||
|
24. If hasDuplicates is true, then
|
||||||
|
[...]
|
||||||
|
25. Else,
|
||||||
|
a. Perform ? IteratorBindingInitialization for formals with
|
||||||
|
iteratorRecord and env as arguments.
|
||||||
|
[...]
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
var callCount = 0;
|
||||||
|
|
||||||
|
// Stores a reference `ref` for case evaluation
|
||||||
|
var ref;
|
||||||
|
ref = async function ref(fromLiteral = 23, fromExpr = 45, fromHole = 99) {
|
||||||
|
assert.sameValue(fromLiteral, 23);
|
||||||
|
assert.sameValue(fromExpr, 45);
|
||||||
|
assert.sameValue(fromHole, 99);
|
||||||
|
callCount = callCount + 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
ref(undefined, void 0).then(() => {
|
||||||
|
assert.sameValue(callCount, 1, 'function invoked exactly once');
|
||||||
|
}).then($DONE, $DONE);
|
@ -0,0 +1,37 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/function-forms/dflt-params-duplicates.case
|
||||||
|
// - src/function-forms/syntax/async-func-expr-named.template
|
||||||
|
/*---
|
||||||
|
description: It is a Syntax Error if BoundNames of FormalParameters contains any duplicate elements. (async function named expression)
|
||||||
|
esid: sec-async-function-definitions
|
||||||
|
features: [default-parameters]
|
||||||
|
flags: [generated]
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
info: |
|
||||||
|
14.6 Async Function Definitions
|
||||||
|
|
||||||
|
AsyncFunctionExpression :
|
||||||
|
async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
14.1.2 Static Semantics: Early Errors
|
||||||
|
|
||||||
|
StrictFormalParameters : FormalParameters
|
||||||
|
|
||||||
|
- It is a Syntax Error if BoundNames of FormalParameters contains any
|
||||||
|
duplicate elements.
|
||||||
|
|
||||||
|
FormalParameters : FormalParameterList
|
||||||
|
|
||||||
|
- It is a Syntax Error if IsSimpleParameterList of FormalParameterList is
|
||||||
|
false and BoundNames of FormalParameterList contains any duplicate
|
||||||
|
elements.
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
(async function f(x = 0, x) {
|
||||||
|
|
||||||
|
});
|
@ -0,0 +1,43 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/function-forms/dflt-params-ref-later.case
|
||||||
|
// - src/function-forms/error/async-func-expr-named.template
|
||||||
|
/*---
|
||||||
|
description: Referencing a parameter that occurs later in the ParameterList (async function named expression)
|
||||||
|
esid: sec-async-function-definitions
|
||||||
|
features: [default-parameters]
|
||||||
|
flags: [generated, async]
|
||||||
|
info: |
|
||||||
|
14.6 Async Function Definitions
|
||||||
|
|
||||||
|
AsyncFunctionExpression :
|
||||||
|
async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
14.1.19 Runtime Semantics: IteratorBindingInitialization
|
||||||
|
|
||||||
|
FormalsList : FormalsList , FormalParameter
|
||||||
|
|
||||||
|
1. Let status be the result of performing IteratorBindingInitialization for
|
||||||
|
FormalsList using iteratorRecord and environment as the arguments.
|
||||||
|
2. ReturnIfAbrupt(status).
|
||||||
|
3. Return the result of performing IteratorBindingInitialization for
|
||||||
|
FormalParameter using iteratorRecord and environment as the arguments.
|
||||||
|
|
||||||
|
---*/
|
||||||
|
var x = 0;
|
||||||
|
|
||||||
|
|
||||||
|
var callCount = 0;
|
||||||
|
var f = async function f(x = y, y) {
|
||||||
|
|
||||||
|
callCount = callCount + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
f()
|
||||||
|
.then(_ => {
|
||||||
|
throw new Test262Error('function should not be resolved');
|
||||||
|
}, error => assert.sameValue(error.constructor, ReferenceError))
|
||||||
|
.then(() => {
|
||||||
|
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||||
|
}, $DONE)
|
||||||
|
.then($DONE, $DONE);
|
@ -0,0 +1,43 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/function-forms/dflt-params-ref-prior.case
|
||||||
|
// - src/function-forms/default/async-func-expr-named.template
|
||||||
|
/*---
|
||||||
|
description: Referencing a parameter that occurs earlier in the ParameterList (async function named expression)
|
||||||
|
esid: sec-async-function-definitions
|
||||||
|
features: [default-parameters]
|
||||||
|
flags: [generated, async]
|
||||||
|
info: |
|
||||||
|
14.6 Async Function Definitions
|
||||||
|
|
||||||
|
AsyncFunctionExpression :
|
||||||
|
async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
14.1.19 Runtime Semantics: IteratorBindingInitialization
|
||||||
|
|
||||||
|
FormalsList : FormalsList , FormalParameter
|
||||||
|
|
||||||
|
1. Let status be the result of performing IteratorBindingInitialization for
|
||||||
|
FormalsList using iteratorRecord and environment as the arguments.
|
||||||
|
2. ReturnIfAbrupt(status).
|
||||||
|
3. Return the result of performing IteratorBindingInitialization for
|
||||||
|
FormalParameter using iteratorRecord and environment as the arguments.
|
||||||
|
|
||||||
|
---*/
|
||||||
|
var x = 0;
|
||||||
|
|
||||||
|
|
||||||
|
var callCount = 0;
|
||||||
|
|
||||||
|
// Stores a reference `ref` for case evaluation
|
||||||
|
var ref;
|
||||||
|
ref = async function ref(x, y = x, z = y) {
|
||||||
|
assert.sameValue(x, 3, 'first argument value');
|
||||||
|
assert.sameValue(y, 3, 'second argument value');
|
||||||
|
assert.sameValue(z, 3, 'third argument value');
|
||||||
|
callCount = callCount + 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
ref(3).then(() => {
|
||||||
|
assert.sameValue(callCount, 1, 'function invoked exactly once');
|
||||||
|
}).then($DONE, $DONE);
|
@ -0,0 +1,43 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/function-forms/dflt-params-ref-self.case
|
||||||
|
// - src/function-forms/error/async-func-expr-named.template
|
||||||
|
/*---
|
||||||
|
description: Referencing a parameter from within its own initializer (async function named expression)
|
||||||
|
esid: sec-async-function-definitions
|
||||||
|
features: [default-parameters]
|
||||||
|
flags: [generated, async]
|
||||||
|
info: |
|
||||||
|
14.6 Async Function Definitions
|
||||||
|
|
||||||
|
AsyncFunctionExpression :
|
||||||
|
async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
14.1.19 Runtime Semantics: IteratorBindingInitialization
|
||||||
|
|
||||||
|
FormalsList : FormalsList , FormalParameter
|
||||||
|
|
||||||
|
1. Let status be the result of performing IteratorBindingInitialization for
|
||||||
|
FormalsList using iteratorRecord and environment as the arguments.
|
||||||
|
2. ReturnIfAbrupt(status).
|
||||||
|
3. Return the result of performing IteratorBindingInitialization for
|
||||||
|
FormalParameter using iteratorRecord and environment as the arguments.
|
||||||
|
|
||||||
|
---*/
|
||||||
|
var x = 0;
|
||||||
|
|
||||||
|
|
||||||
|
var callCount = 0;
|
||||||
|
var f = async function f(x = x) {
|
||||||
|
|
||||||
|
callCount = callCount + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
f()
|
||||||
|
.then(_ => {
|
||||||
|
throw new Test262Error('function should not be resolved');
|
||||||
|
}, error => assert.sameValue(error.constructor, ReferenceError))
|
||||||
|
.then(() => {
|
||||||
|
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||||
|
}, $DONE)
|
||||||
|
.then($DONE, $DONE);
|
@ -0,0 +1,41 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/function-forms/dflt-params-rest.case
|
||||||
|
// - src/function-forms/syntax/async-func-expr-named.template
|
||||||
|
/*---
|
||||||
|
description: RestParameter does not support an initializer (async function named expression)
|
||||||
|
esid: sec-async-function-definitions
|
||||||
|
features: [default-parameters]
|
||||||
|
flags: [generated]
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
info: |
|
||||||
|
14.6 Async Function Definitions
|
||||||
|
|
||||||
|
AsyncFunctionExpression :
|
||||||
|
async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
14.1 Function Definitions
|
||||||
|
|
||||||
|
Syntax
|
||||||
|
|
||||||
|
FunctionRestParameter[Yield] :
|
||||||
|
|
||||||
|
BindingRestElement[?Yield]
|
||||||
|
|
||||||
|
13.3.3 Destructuring Binding Patterns
|
||||||
|
|
||||||
|
Syntax
|
||||||
|
|
||||||
|
BindingRestElement[Yield] :
|
||||||
|
|
||||||
|
...BindingIdentifier[?Yield]
|
||||||
|
...BindingPattern[?Yield]
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
(async function f(...x = []) {
|
||||||
|
|
||||||
|
});
|
@ -0,0 +1,37 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/function-forms/dflt-params-trailing-comma.case
|
||||||
|
// - src/function-forms/default/async-func-expr-named.template
|
||||||
|
/*---
|
||||||
|
description: A trailing comma should not increase the respective length, using default parameters (async function named expression)
|
||||||
|
esid: sec-async-function-definitions
|
||||||
|
flags: [generated, async]
|
||||||
|
info: |
|
||||||
|
14.6 Async Function Definitions
|
||||||
|
|
||||||
|
AsyncFunctionExpression :
|
||||||
|
async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
Trailing comma in the parameters list
|
||||||
|
|
||||||
|
14.1 Function Definitions
|
||||||
|
|
||||||
|
FormalParameters[Yield, Await] : FormalParameterList[?Yield, ?Await] ,
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
var callCount = 0;
|
||||||
|
|
||||||
|
// Stores a reference `ref` for case evaluation
|
||||||
|
var ref;
|
||||||
|
ref = async function ref(a, b = 39,) {
|
||||||
|
assert.sameValue(a, 42);
|
||||||
|
assert.sameValue(b, 39);
|
||||||
|
callCount = callCount + 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
ref(42, undefined, 1).then(() => {
|
||||||
|
assert.sameValue(callCount, 1, 'function invoked exactly once');
|
||||||
|
}).then($DONE, $DONE);
|
||||||
|
|
||||||
|
assert.sameValue(ref.length, 1, 'length is properly set');
|
@ -0,0 +1,37 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/function-forms/params-trailing-comma-multiple.case
|
||||||
|
// - src/function-forms/default/async-func-expr-named.template
|
||||||
|
/*---
|
||||||
|
description: A trailing comma should not increase the respective length, using multiple parameters (async function named expression)
|
||||||
|
esid: sec-async-function-definitions
|
||||||
|
flags: [generated, async]
|
||||||
|
info: |
|
||||||
|
14.6 Async Function Definitions
|
||||||
|
|
||||||
|
AsyncFunctionExpression :
|
||||||
|
async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
Trailing comma in the parameters list
|
||||||
|
|
||||||
|
14.1 Function Definitions
|
||||||
|
|
||||||
|
FormalParameters[Yield, Await] : FormalParameterList[?Yield, ?Await] ,
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
var callCount = 0;
|
||||||
|
|
||||||
|
// Stores a reference `ref` for case evaluation
|
||||||
|
var ref;
|
||||||
|
ref = async function ref(a, b,) {
|
||||||
|
assert.sameValue(a, 42);
|
||||||
|
assert.sameValue(b, 39);
|
||||||
|
callCount = callCount + 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
ref(42, 39, 1).then(() => {
|
||||||
|
assert.sameValue(callCount, 1, 'function invoked exactly once');
|
||||||
|
}).then($DONE, $DONE);
|
||||||
|
|
||||||
|
assert.sameValue(ref.length, 2, 'length is properly set');
|
@ -0,0 +1,36 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/function-forms/params-trailing-comma-single.case
|
||||||
|
// - src/function-forms/default/async-func-expr-named.template
|
||||||
|
/*---
|
||||||
|
description: A trailing comma should not increase the respective length, using a single parameter (async function named expression)
|
||||||
|
esid: sec-async-function-definitions
|
||||||
|
flags: [generated, async]
|
||||||
|
info: |
|
||||||
|
14.6 Async Function Definitions
|
||||||
|
|
||||||
|
AsyncFunctionExpression :
|
||||||
|
async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
Trailing comma in the parameters list
|
||||||
|
|
||||||
|
14.1 Function Definitions
|
||||||
|
|
||||||
|
FormalParameters[Yield, Await] : FormalParameterList[?Yield, ?Await] ,
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
var callCount = 0;
|
||||||
|
|
||||||
|
// Stores a reference `ref` for case evaluation
|
||||||
|
var ref;
|
||||||
|
ref = async function ref(a,) {
|
||||||
|
assert.sameValue(a, 42);
|
||||||
|
callCount = callCount + 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
ref(42, 39).then(() => {
|
||||||
|
assert.sameValue(callCount, 1, 'function invoked exactly once');
|
||||||
|
}).then($DONE, $DONE);
|
||||||
|
|
||||||
|
assert.sameValue(ref.length, 1, 'length is properly set');
|
@ -0,0 +1,33 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/function-forms/rest-params-trailing-comma-early-error.case
|
||||||
|
// - src/function-forms/syntax/async-func-expr-named.template
|
||||||
|
/*---
|
||||||
|
description: It's a syntax error if a FunctionRestParameter is followed by a trailing comma (async function named expression)
|
||||||
|
esid: sec-async-function-definitions
|
||||||
|
flags: [generated]
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
info: |
|
||||||
|
14.6 Async Function Definitions
|
||||||
|
|
||||||
|
AsyncFunctionExpression :
|
||||||
|
async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
Trailing comma in the parameters list
|
||||||
|
|
||||||
|
14.1 Function Definitions
|
||||||
|
|
||||||
|
FormalParameters[Yield, Await] :
|
||||||
|
[empty]
|
||||||
|
FunctionRestParameter[?Yield, ?Await]
|
||||||
|
FormalParameterList[?Yield, ?Await]
|
||||||
|
FormalParameterList[?Yield, ?Await] ,
|
||||||
|
FormalParameterList[?Yield, ?Await] , FunctionRestParameter[?Yield, ?Await]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
(async function f(...a,) {
|
||||||
|
|
||||||
|
});
|
@ -0,0 +1,42 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/function-forms/dflt-params-abrupt.case
|
||||||
|
// - src/function-forms/error/async-func-expr-nameless.template
|
||||||
|
/*---
|
||||||
|
description: Abrupt completion returned by evaluation of initializer (async function nameless expression)
|
||||||
|
esid: sec-async-function-definitions
|
||||||
|
features: [default-parameters]
|
||||||
|
flags: [generated, async]
|
||||||
|
info: |
|
||||||
|
14.6 Async Function Definitions
|
||||||
|
|
||||||
|
AsyncFunctionExpression :
|
||||||
|
async function ( FormalParameters ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
14.1.19 Runtime Semantics: IteratorBindingInitialization
|
||||||
|
|
||||||
|
FormalsList : FormalsList , FormalParameter
|
||||||
|
|
||||||
|
1. Let status be the result of performing IteratorBindingInitialization for
|
||||||
|
FormalsList using iteratorRecord and environment as the arguments.
|
||||||
|
2. ReturnIfAbrupt(status).
|
||||||
|
3. Return the result of performing IteratorBindingInitialization for
|
||||||
|
FormalParameter using iteratorRecord and environment as the arguments.
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
var callCount = 0;
|
||||||
|
var f = async function(_ = (function() { throw new Test262Error(); }())) {
|
||||||
|
|
||||||
|
callCount = callCount + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
f()
|
||||||
|
.then(_ => {
|
||||||
|
throw new Test262Error('function should not be resolved');
|
||||||
|
}, error => assert.sameValue(error.constructor, Test262Error))
|
||||||
|
.then(() => {
|
||||||
|
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||||
|
}, $DONE)
|
||||||
|
.then($DONE, $DONE);
|
@ -0,0 +1,63 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/function-forms/dflt-params-arg-val-not-undefined.case
|
||||||
|
// - src/function-forms/default/async-func-expr-nameless.template
|
||||||
|
/*---
|
||||||
|
description: Use of intializer when argument value is not `undefined` (async function nameless expression)
|
||||||
|
esid: sec-async-function-definitions
|
||||||
|
features: [default-parameters]
|
||||||
|
flags: [generated, async]
|
||||||
|
info: |
|
||||||
|
14.6 Async Function Definitions
|
||||||
|
|
||||||
|
AsyncFunctionExpression :
|
||||||
|
async function ( FormalParameters ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
14.1.19 Runtime Semantics: IteratorBindingInitialization
|
||||||
|
|
||||||
|
FormalsList : FormalsList , FormalParameter
|
||||||
|
|
||||||
|
[...]
|
||||||
|
23. Let iteratorRecord be Record {[[Iterator]]:
|
||||||
|
CreateListIterator(argumentsList), [[Done]]: false}.
|
||||||
|
24. If hasDuplicates is true, then
|
||||||
|
[...]
|
||||||
|
25. Else,
|
||||||
|
a. Perform ? IteratorBindingInitialization for formals with
|
||||||
|
iteratorRecord and env as arguments.
|
||||||
|
[...]
|
||||||
|
|
||||||
|
---*/
|
||||||
|
var obj = {};
|
||||||
|
var falseCount = 0;
|
||||||
|
var stringCount = 0;
|
||||||
|
var nanCount = 0;
|
||||||
|
var zeroCount = 0;
|
||||||
|
var nullCount = 0;
|
||||||
|
var objCount = 0;
|
||||||
|
|
||||||
|
|
||||||
|
var callCount = 0;
|
||||||
|
|
||||||
|
// Stores a reference `ref` for case evaluation
|
||||||
|
var ref;
|
||||||
|
ref = async function(aFalse = falseCount +=1, aString = stringCount += 1, aNaN = nanCount += 1, a0 = zeroCount += 1, aNull = nullCount += 1, aObj = objCount +=1) {
|
||||||
|
assert.sameValue(aFalse, false);
|
||||||
|
assert.sameValue(aString, '');
|
||||||
|
assert.sameValue(aNaN, NaN);
|
||||||
|
assert.sameValue(a0, 0);
|
||||||
|
assert.sameValue(aNull, null);
|
||||||
|
assert.sameValue(aObj, obj);
|
||||||
|
callCount = callCount + 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
ref(false, '', NaN, 0, null, obj).then(() => {
|
||||||
|
assert.sameValue(callCount, 1, 'function invoked exactly once');
|
||||||
|
}).then($DONE, $DONE);
|
||||||
|
|
||||||
|
assert.sameValue(falseCount, 0, 'initializer not evaluated: false');
|
||||||
|
assert.sameValue(stringCount, 0, 'initializer not evaluated: string');
|
||||||
|
assert.sameValue(nanCount, 0, 'initializer not evaluated: NaN');
|
||||||
|
assert.sameValue(zeroCount, 0, 'initializer not evaluated: 0');
|
||||||
|
assert.sameValue(nullCount, 0, 'initializer not evaluated: null');
|
||||||
|
assert.sameValue(objCount, 0, 'initializer not evaluated: object');
|
@ -0,0 +1,46 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/function-forms/dflt-params-arg-val-undefined.case
|
||||||
|
// - src/function-forms/default/async-func-expr-nameless.template
|
||||||
|
/*---
|
||||||
|
description: Use of intializer when argument value is `undefined` (async function nameless expression)
|
||||||
|
esid: sec-async-function-definitions
|
||||||
|
features: [default-parameters]
|
||||||
|
flags: [generated, async]
|
||||||
|
info: |
|
||||||
|
14.6 Async Function Definitions
|
||||||
|
|
||||||
|
AsyncFunctionExpression :
|
||||||
|
async function ( FormalParameters ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
14.1.19 Runtime Semantics: IteratorBindingInitialization
|
||||||
|
|
||||||
|
FormalsList : FormalsList , FormalParameter
|
||||||
|
|
||||||
|
[...]
|
||||||
|
23. Let iteratorRecord be Record {[[Iterator]]:
|
||||||
|
CreateListIterator(argumentsList), [[Done]]: false}.
|
||||||
|
24. If hasDuplicates is true, then
|
||||||
|
[...]
|
||||||
|
25. Else,
|
||||||
|
a. Perform ? IteratorBindingInitialization for formals with
|
||||||
|
iteratorRecord and env as arguments.
|
||||||
|
[...]
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
var callCount = 0;
|
||||||
|
|
||||||
|
// Stores a reference `ref` for case evaluation
|
||||||
|
var ref;
|
||||||
|
ref = async function(fromLiteral = 23, fromExpr = 45, fromHole = 99) {
|
||||||
|
assert.sameValue(fromLiteral, 23);
|
||||||
|
assert.sameValue(fromExpr, 45);
|
||||||
|
assert.sameValue(fromHole, 99);
|
||||||
|
callCount = callCount + 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
ref(undefined, void 0).then(() => {
|
||||||
|
assert.sameValue(callCount, 1, 'function invoked exactly once');
|
||||||
|
}).then($DONE, $DONE);
|
@ -0,0 +1,36 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/function-forms/dflt-params-duplicates.case
|
||||||
|
// - src/function-forms/syntax/async-func-expr-nameless.template
|
||||||
|
/*---
|
||||||
|
description: It is a Syntax Error if BoundNames of FormalParameters contains any duplicate elements. (async function nameless expression)
|
||||||
|
esid: sec-async-function-definitions
|
||||||
|
features: [default-parameters]
|
||||||
|
flags: [generated]
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
info: |
|
||||||
|
14.6 Async Function Definitions
|
||||||
|
|
||||||
|
AsyncFunctionExpression :
|
||||||
|
async function ( FormalParameters ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
14.1.2 Static Semantics: Early Errors
|
||||||
|
|
||||||
|
StrictFormalParameters : FormalParameters
|
||||||
|
|
||||||
|
- It is a Syntax Error if BoundNames of FormalParameters contains any
|
||||||
|
duplicate elements.
|
||||||
|
|
||||||
|
FormalParameters : FormalParameterList
|
||||||
|
|
||||||
|
- It is a Syntax Error if IsSimpleParameterList of FormalParameterList is
|
||||||
|
false and BoundNames of FormalParameterList contains any duplicate
|
||||||
|
elements.
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
(async function(x = 0, x) {
|
||||||
|
|
||||||
|
});
|
@ -0,0 +1,43 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/function-forms/dflt-params-ref-later.case
|
||||||
|
// - src/function-forms/error/async-func-expr-nameless.template
|
||||||
|
/*---
|
||||||
|
description: Referencing a parameter that occurs later in the ParameterList (async function nameless expression)
|
||||||
|
esid: sec-async-function-definitions
|
||||||
|
features: [default-parameters]
|
||||||
|
flags: [generated, async]
|
||||||
|
info: |
|
||||||
|
14.6 Async Function Definitions
|
||||||
|
|
||||||
|
AsyncFunctionExpression :
|
||||||
|
async function ( FormalParameters ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
14.1.19 Runtime Semantics: IteratorBindingInitialization
|
||||||
|
|
||||||
|
FormalsList : FormalsList , FormalParameter
|
||||||
|
|
||||||
|
1. Let status be the result of performing IteratorBindingInitialization for
|
||||||
|
FormalsList using iteratorRecord and environment as the arguments.
|
||||||
|
2. ReturnIfAbrupt(status).
|
||||||
|
3. Return the result of performing IteratorBindingInitialization for
|
||||||
|
FormalParameter using iteratorRecord and environment as the arguments.
|
||||||
|
|
||||||
|
---*/
|
||||||
|
var x = 0;
|
||||||
|
|
||||||
|
|
||||||
|
var callCount = 0;
|
||||||
|
var f = async function(x = y, y) {
|
||||||
|
|
||||||
|
callCount = callCount + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
f()
|
||||||
|
.then(_ => {
|
||||||
|
throw new Test262Error('function should not be resolved');
|
||||||
|
}, error => assert.sameValue(error.constructor, ReferenceError))
|
||||||
|
.then(() => {
|
||||||
|
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||||
|
}, $DONE)
|
||||||
|
.then($DONE, $DONE);
|
@ -0,0 +1,43 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/function-forms/dflt-params-ref-prior.case
|
||||||
|
// - src/function-forms/default/async-func-expr-nameless.template
|
||||||
|
/*---
|
||||||
|
description: Referencing a parameter that occurs earlier in the ParameterList (async function nameless expression)
|
||||||
|
esid: sec-async-function-definitions
|
||||||
|
features: [default-parameters]
|
||||||
|
flags: [generated, async]
|
||||||
|
info: |
|
||||||
|
14.6 Async Function Definitions
|
||||||
|
|
||||||
|
AsyncFunctionExpression :
|
||||||
|
async function ( FormalParameters ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
14.1.19 Runtime Semantics: IteratorBindingInitialization
|
||||||
|
|
||||||
|
FormalsList : FormalsList , FormalParameter
|
||||||
|
|
||||||
|
1. Let status be the result of performing IteratorBindingInitialization for
|
||||||
|
FormalsList using iteratorRecord and environment as the arguments.
|
||||||
|
2. ReturnIfAbrupt(status).
|
||||||
|
3. Return the result of performing IteratorBindingInitialization for
|
||||||
|
FormalParameter using iteratorRecord and environment as the arguments.
|
||||||
|
|
||||||
|
---*/
|
||||||
|
var x = 0;
|
||||||
|
|
||||||
|
|
||||||
|
var callCount = 0;
|
||||||
|
|
||||||
|
// Stores a reference `ref` for case evaluation
|
||||||
|
var ref;
|
||||||
|
ref = async function(x, y = x, z = y) {
|
||||||
|
assert.sameValue(x, 3, 'first argument value');
|
||||||
|
assert.sameValue(y, 3, 'second argument value');
|
||||||
|
assert.sameValue(z, 3, 'third argument value');
|
||||||
|
callCount = callCount + 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
ref(3).then(() => {
|
||||||
|
assert.sameValue(callCount, 1, 'function invoked exactly once');
|
||||||
|
}).then($DONE, $DONE);
|
@ -0,0 +1,43 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/function-forms/dflt-params-ref-self.case
|
||||||
|
// - src/function-forms/error/async-func-expr-nameless.template
|
||||||
|
/*---
|
||||||
|
description: Referencing a parameter from within its own initializer (async function nameless expression)
|
||||||
|
esid: sec-async-function-definitions
|
||||||
|
features: [default-parameters]
|
||||||
|
flags: [generated, async]
|
||||||
|
info: |
|
||||||
|
14.6 Async Function Definitions
|
||||||
|
|
||||||
|
AsyncFunctionExpression :
|
||||||
|
async function ( FormalParameters ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
14.1.19 Runtime Semantics: IteratorBindingInitialization
|
||||||
|
|
||||||
|
FormalsList : FormalsList , FormalParameter
|
||||||
|
|
||||||
|
1. Let status be the result of performing IteratorBindingInitialization for
|
||||||
|
FormalsList using iteratorRecord and environment as the arguments.
|
||||||
|
2. ReturnIfAbrupt(status).
|
||||||
|
3. Return the result of performing IteratorBindingInitialization for
|
||||||
|
FormalParameter using iteratorRecord and environment as the arguments.
|
||||||
|
|
||||||
|
---*/
|
||||||
|
var x = 0;
|
||||||
|
|
||||||
|
|
||||||
|
var callCount = 0;
|
||||||
|
var f = async function(x = x) {
|
||||||
|
|
||||||
|
callCount = callCount + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
f()
|
||||||
|
.then(_ => {
|
||||||
|
throw new Test262Error('function should not be resolved');
|
||||||
|
}, error => assert.sameValue(error.constructor, ReferenceError))
|
||||||
|
.then(() => {
|
||||||
|
assert.sameValue(callCount, 0, 'function body is not evaluated');
|
||||||
|
}, $DONE)
|
||||||
|
.then($DONE, $DONE);
|
@ -0,0 +1,40 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/function-forms/dflt-params-rest.case
|
||||||
|
// - src/function-forms/syntax/async-func-expr-nameless.template
|
||||||
|
/*---
|
||||||
|
description: RestParameter does not support an initializer (async function nameless expression)
|
||||||
|
esid: sec-async-function-definitions
|
||||||
|
features: [default-parameters]
|
||||||
|
flags: [generated]
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
info: |
|
||||||
|
14.6 Async Function Definitions
|
||||||
|
|
||||||
|
AsyncFunctionExpression :
|
||||||
|
async function ( FormalParameters ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
14.1 Function Definitions
|
||||||
|
|
||||||
|
Syntax
|
||||||
|
|
||||||
|
FunctionRestParameter[Yield] :
|
||||||
|
|
||||||
|
BindingRestElement[?Yield]
|
||||||
|
|
||||||
|
13.3.3 Destructuring Binding Patterns
|
||||||
|
|
||||||
|
Syntax
|
||||||
|
|
||||||
|
BindingRestElement[Yield] :
|
||||||
|
|
||||||
|
...BindingIdentifier[?Yield]
|
||||||
|
...BindingPattern[?Yield]
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
(async function(...x = []) {
|
||||||
|
|
||||||
|
});
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user