5d5a659539
The `capture_ix` refers to all captures while `capture_count` only refers to named captures. Clarified by renaming `capture_count` to `named_capture_count` and removing the incorrect part of the DCHECK. The `>= 1` part of the condition must still hold since named captures can only refer to explicit capture groups, which start at index 1. Tbr: petermarshall@chromium.org Bug: chromium:1018592 Change-Id: If8a26f6661ba0483d585f74270b3b4a3853e2ca8 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1886810 Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Jakob Gruber <jgruber@chromium.org> Auto-Submit: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#64629}
7 lines
235 B
JavaScript
7 lines
235 B
JavaScript
// Copyright 2019 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
const re = /()()()()(?<aaaab>)1/;
|
|
"111a1a".replace(re, () => {}) ;
|