blob: edb02b3b8c4be34eed057f209ebfbb1037f022d2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
// Copyright (C) 2018 Peter Wong. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: pending
description: Re-throws errors while creating an internal RegExp
info: |
RegExp.prototype [ @@matchAll ] ( string )
[...]
3. Return ? MatchAllIterator(R, string).
MatchAllIterator ( R, O )
[...]
2. If ? IsRegExp(R) is true, then
[...]
3. Else,
a. Let flags be "g".
b. Let matcher be ? RegExpCreate(R, flags).
features: [Symbol.matchAll]
---*/
var obj = {
toString() {
throw new Test262Error();
}
};
assert.throws(Test262Error, function() {
RegExp.prototype[Symbol.matchAll].call(obj, '');
});
reportCompare(0, 0);
|