1 // Copyright (C) 2016 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
4 esid: sec-regexp-pattern-flags
5 description: Initial state of the `lastIndex` property
8 7. Let O be ? RegExpAlloc(newTarget).
9 8. Return ? RegExpInitialize(O, P, F).
11 21.2.3.2.2 Runtime Semantics: RegExpInitialize
14 12. Perform ? Set(obj, "lastIndex", 0, true).
17 21.2.3.2.1 Runtime Semantics: RegExpAlloc
20 2. Perform ! DefinePropertyOrThrow(obj, "lastIndex", PropertyDescriptor
21 {[[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: false}).
23 includes: [propertyHelper.js]
26 var re = new RegExp('');
28 assert.sameValue(re.lastIndex, 0);
30 verifyNotEnumerable(re, 'lastIndex');
31 verifyWritable(re, 'lastIndex');
32 verifyNotConfigurable(re, 'lastIndex');