Test case: /\d/.exec("1").hasOwnProperty("groups") Expected: true Actual: false Also, "groups" object should have `null` [[Prototype]]. Discussion: https://github.com/tc39/proposal-regexp-named-groups/issues/34 ECMA262: https://tc39.es/ecma262/#sec-regexpbuiltinexec (step 24) Test262: https://test262.report/browse/built-ins/RegExp/named-groups/groups-object-undefined.js https://test262.report/browse/built-ins/RegExp/named-groups/groups-object.js
Created attachment 383266 [details] Patch
I am adding this bug as a blocker of RegExp Match Indices proposal (https://bugs.webkit.org/show_bug.cgi?id=202475), because "indices" property should be created after "groups" (order is observable), and the way we currently add properties in RegExpMatchesArray.cpp/createStructureImpl will make that unnecessarily tricky.
Comment on attachment 383266 [details] Patch Nice!
Comment on attachment 383266 [details] Patch Clearing flags on attachment: 383266 Committed r252374: <https://trac.webkit.org/changeset/252374>
All reviewed patches have been landed. Closing bug.
<rdar://problem/57130089>