summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/reflect-parse
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
commit8dd16259287f58f9273002717ec4d27e97127719 (patch)
tree3863e62a53829a84037444beab3abd4ed9dfc7d0 /js/src/tests/non262/reflect-parse
parentReleasing progress-linux version 126.0.1-1~progress7.99u1. (diff)
downloadfirefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz
firefox-8dd16259287f58f9273002717ec4d27e97127719.zip
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/src/tests/non262/reflect-parse')
-rw-r--r--js/src/tests/non262/reflect-parse/declarations.js17
1 files changed, 8 insertions, 9 deletions
diff --git a/js/src/tests/non262/reflect-parse/declarations.js b/js/src/tests/non262/reflect-parse/declarations.js
index 4962f4cee9..b65fda3536 100644
--- a/js/src/tests/non262/reflect-parse/declarations.js
+++ b/js/src/tests/non262/reflect-parse/declarations.js
@@ -49,11 +49,11 @@ assertDecl("function f(a,[x,y]) { function a() { } }",
[ident("a"), arrPatt([assignElem("x"), assignElem("y")])],
blockStmt([funDecl(ident("a"), [], blockStmt([]))])));
-// Bug 591450: this test currently crashes because of a bug in jsparse
-// assertDecl("function f(a,[x,y],b,[w,z],c) { function b() { } }",
-// funDecl(ident("f"),
-// [ident("a"), arrPatt([ident("x"), ident("y")]), ident("b"), arrPatt([ident("w"), ident("z")]), ident("c")],
-// blockStmt([funDecl(ident("b"), [], blockStmt([]))])));
+// Bug 591450: this test was crashing because of a bug in jsparse
+assertDecl("function f(a,[x,y],b,[w,z],c) { function b() { } }",
+ funDecl(ident("f"),
+ [ident("a"), arrPatt([ident("x"), ident("y")]), ident("b"), arrPatt([ident("w"), ident("z")]), ident("c")],
+ blockStmt([funDecl(ident("b"), [], blockStmt([]))])));
// redeclarations (TOK_NAME nodes with lexdef)
@@ -61,10 +61,9 @@ assertStmt("function f() { function g() { } function g() { } }",
funDecl(ident("f"), [], blockStmt([funDecl(ident("g"), [], blockStmt([])),
funDecl(ident("g"), [], blockStmt([]))])));
-// Fails due to parser quirks (bug 638577)
-//assertStmt("function f() { function g() { } function g() { return 42 } }",
-// funDecl(ident("f"), [], blockStmt([funDecl(ident("g"), [], blockStmt([])),
-// funDecl(ident("g"), [], blockStmt([returnStmt(lit(42))]))])));
+assertStmt("function f() { function g() { } function g() { return 42 } }",
+ funDecl(ident("f"), [], blockStmt([funDecl(ident("g"), [], blockStmt([])),
+ funDecl(ident("g"), [], blockStmt([returnStmt(lit(42))]))])));
assertStmt("function f() { var x = 42; var x = 43; }",
funDecl(ident("f"), [], blockStmt([varDecl([{ id: ident("x"), init: lit(42) }]),