summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/regexp/bug1640487.js
blob: 7ee3756075b9d0199b65d14d8aa1c7555bc0326b (plain)
1
2
3
4
5
6
7
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);