summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/statements/with/decl-async-gen.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/test262/language/statements/with/decl-async-gen.js')
-rw-r--r--js/src/tests/test262/language/statements/with/decl-async-gen.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/js/src/tests/test262/language/statements/with/decl-async-gen.js b/js/src/tests/test262/language/statements/with/decl-async-gen.js
new file mode 100644
index 0000000000..f9aa632bc7
--- /dev/null
+++ b/js/src/tests/test262/language/statements/with/decl-async-gen.js
@@ -0,0 +1,22 @@
+// |reftest| error:SyntaxError
+// Copyright (C) 2017 André Bargull. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-with-statement
+description: >
+ AsyncGeneratorDeclaration is not allowed in statement position
+info: |
+ ExpressionStatement[Yield, Await] :
+ [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }]
+ Expression[+In, ?Yield, ?Await] ;
+negative:
+ phase: parse
+ type: SyntaxError
+features: [async-iteration]
+flags: [noStrict]
+---*/
+
+$DONOTEVALUATE();
+
+with ({}) async function* g() {}