Bug 1640487: Add testcase r=tcampbell
authorIain Ireland <iireland@mozilla.com>
Thu, 28 May 2020 17:04:06 +0000
changeset 597606 457f22865596486f79d5f8bee6cc046569a422c3
parent 597605 0c8ea1dc2587ccf8ab24bc983946855241783149
child 597607 d5cc480a68830eb9f3c30042331092857810e9df
push id13310
push userffxbld-merge
push dateMon, 29 Jun 2020 14:50:06 +0000
treeherdermozilla-beta@15a59a0afa5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstcampbell
bugs1640487
milestone79.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1640487: Add testcase r=tcampbell Differential Revision: https://phabricator.services.mozilla.com/D77088
js/src/jit-test/tests/regexp/bug1640487.js
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/regexp/bug1640487.js
@@ -0,0 +1,8 @@
+var re = /(?<x>a)|b/;
+
+function f(j) {
+    var s = String.fromCharCode(0x61 + (j === 1));
+    var e = re.exec(s);
+    if (e.groups.x !== "a") print(i,j);
+}
+for (var i = 0; i < 2; ++i) f(i);