summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-3-u.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-3-u.js')
-rw-r--r--js/src/tests/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-3-u.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/js/src/tests/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-3-u.js b/js/src/tests/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-3-u.js
new file mode 100644
index 0000000000..ab2512d83e
--- /dev/null
+++ b/js/src/tests/test262/language/literals/regexp/named-groups/invalid-dangling-groupname-3-u.js
@@ -0,0 +1,21 @@
+// |reftest| error:SyntaxError
+// Copyright 2017 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Group reference must have corresponding group.
+info: |
+ It is a Syntax Error if the enclosing Pattern does not contain a
+ GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue
+ equals the StringValue of the RegExpIdentifierName of this production's
+ GroupName.
+esid: sec-patterns-static-semantics-early-errors
+negative:
+ phase: parse
+ type: SyntaxError
+features: [regexp-named-groups]
+---*/
+
+$DONOTEVALUATE();
+
+/(?<ab>a)\k<a>/u;