summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/expressions/async-arrow-function/async-lineterminator-identifier-throws.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/test262/language/expressions/async-arrow-function/async-lineterminator-identifier-throws.js')
-rw-r--r--js/src/tests/test262/language/expressions/async-arrow-function/async-lineterminator-identifier-throws.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/js/src/tests/test262/language/expressions/async-arrow-function/async-lineterminator-identifier-throws.js b/js/src/tests/test262/language/expressions/async-arrow-function/async-lineterminator-identifier-throws.js
new file mode 100644
index 0000000000..51cfd59d43
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/async-arrow-function/async-lineterminator-identifier-throws.js
@@ -0,0 +1,21 @@
+// Copyright (C) 2017 Mozilla Corporation. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: prod-AsyncArrowFunction
+description: >
+ async arrows cannot have a line terminator between "async" and the AsyncArrowBindingIdentifier
+info: |
+ 14.7 Async Arrow Function Definitions
+
+ AsyncArrowFunction:
+ async [no LineTerminator here] AsyncArrowBindingIdentifier [no LineTerminator here] => AsyncConciseBody
+ [...]
+---*/
+
+assert.throws(ReferenceError, function() {
+ async
+ identifier => {}
+});
+
+reportCompare(0, 0);