Invalid regexp literals should throw syntax error in ES11 (#4506)

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
Robert Fancsik
2021-01-19 16:20:23 +01:00
committed by GitHub
parent d97540e883
commit 3e548401fd
11 changed files with 12 additions and 536 deletions
@@ -13,7 +13,7 @@
// limitations under the License.
try {
/?:/
eval('/?:/');
assert(false);
} catch (e) {
assert(e instanceof SyntaxError);
@@ -13,13 +13,13 @@
// limitations under the License.
try {
/(?<=^abc)def/;
eval('/(?<=^abc)def/');
} catch(e) {
assert(e instanceof SyntaxError);
}
try {
/(?a)/;
eval('/(?a)/;')
} catch(e) {
assert(e instanceof SyntaxError);
}