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

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik [email protected]
This commit is contained in:
Robert Fancsik authored and GitHub committed 2021-01-19 16:20:23 +01:00
1 parent d97540e883
commit 3e548401fd
11 files changed
+12 -536

No files matched your search

@@ -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);
}