Update lastIndex handling in RegExpBuiltinExec (#4010)

JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai daniel.batyai@h-lab.eu
This commit is contained in:
Dániel Bátyai
2020-07-21 15:13:51 +02:00
committed by GitHub
parent 69f6bc6566
commit 1eef69f24d
5 changed files with 165 additions and 97 deletions
+2 -2
View File
@@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
var t = new RegExp ("abc","g");
t.lastIndex = -12;
var t = /abc/g;
t.lastIndex = -12.5;
result = t.exec("abc abc");
assert(!result);
assert(t.lastIndex === 0);