test262/test/language/literals/regexp/named-groups/invalid-duplicate-groupspec...

20 lines
613 B
JavaScript
Raw Normal View History

2018-11-05 23:58:03 +01:00
// Copyright 2017 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: GroupSpecifiers within one alternative must be unique.
2018-11-05 23:58:03 +01:00
info: |
It is a Syntax Error if |Pattern| contains two distinct |GroupSpecifier|s
_x_ and _y_ for which CapturingGroupName(_x_) is the same as
CapturingGroupName(_y_) and such that CanBothParticipate(_x_, _y_) is *true*.
2018-11-05 23:58:03 +01:00
esid: sec-patterns-static-semantics-early-errors
negative:
phase: parse
type: SyntaxError
features: [regexp-named-groups]
---*/
2018-11-13 23:48:29 +01:00
$DONOTEVALUATE();
2018-11-05 23:58:03 +01:00
/(?<a>a)(?<b>b)(?<a>a)/;