Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit 3b06b21

Browse files
committed
Bug 638577 - Restore commented out tests r=nbp
The test commented out in bug 630232 now passes. Bug 591450 is closed but failed to uncomment its test, so I'm uncommenting it here. Differential Revision: https://phabricator.services.mozilla.com/D208375
1 parent fe06e97 commit 3b06b21

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

js/src/tests/non262/reflect-parse/declarations.js

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,22 +49,21 @@ assertDecl("function f(a,[x,y]) { function a() { } }",
4949
[ident("a"), arrPatt([assignElem("x"), assignElem("y")])],
5050
blockStmt([funDecl(ident("a"), [], blockStmt([]))])));
5151

52-
// Bug 591450: this test currently crashes because of a bug in jsparse
53-
// assertDecl("function f(a,[x,y],b,[w,z],c) { function b() { } }",
54-
// funDecl(ident("f"),
55-
// [ident("a"), arrPatt([ident("x"), ident("y")]), ident("b"), arrPatt([ident("w"), ident("z")]), ident("c")],
56-
// blockStmt([funDecl(ident("b"), [], blockStmt([]))])));
52+
// Bug 591450: this test was crashing because of a bug in jsparse
53+
assertDecl("function f(a,[x,y],b,[w,z],c) { function b() { } }",
54+
funDecl(ident("f"),
55+
[ident("a"), arrPatt([ident("x"), ident("y")]), ident("b"), arrPatt([ident("w"), ident("z")]), ident("c")],
56+
blockStmt([funDecl(ident("b"), [], blockStmt([]))])));
5757

5858
// redeclarations (TOK_NAME nodes with lexdef)
5959

6060
assertStmt("function f() { function g() { } function g() { } }",
6161
funDecl(ident("f"), [], blockStmt([funDecl(ident("g"), [], blockStmt([])),
6262
funDecl(ident("g"), [], blockStmt([]))])));
6363

64-
// Fails due to parser quirks (bug 638577)
65-
//assertStmt("function f() { function g() { } function g() { return 42 } }",
66-
// funDecl(ident("f"), [], blockStmt([funDecl(ident("g"), [], blockStmt([])),
67-
// funDecl(ident("g"), [], blockStmt([returnStmt(lit(42))]))])));
64+
assertStmt("function f() { function g() { } function g() { return 42 } }",
65+
funDecl(ident("f"), [], blockStmt([funDecl(ident("g"), [], blockStmt([])),
66+
funDecl(ident("g"), [], blockStmt([returnStmt(lit(42))]))])));
6867

6968
assertStmt("function f() { var x = 42; var x = 43; }",
7069
funDecl(ident("f"), [], blockStmt([varDecl([{ id: ident("x"), init: lit(42) }]),

0 commit comments

Comments
 (0)