Closed Bug 638577 Opened 14 years ago Closed 10 months ago

Reflect.parse doesn't handle doubly-declared functions gracefully

Categories

(Core :: JavaScript Engine, defect)

Other Branch
defect

Tracking

()

RESOLVED FIXED
127 Branch
Tracking Status
firefox127 --- fixed

People

(Reporter: jorendorff, Assigned: bthrall)

Details

Attachments

(1 file)

Possibly a duplicate of bug 632030. var a = Reflect.parse( "function f() { return 1; } function f() { return 2; }", {loc: false}); a.body[0].toSource() === a.body[1].toSource() // true No matter what's in the two function bodies, we get the same FunctionDeclaration twice. This quirk never causes Reflect.parse to return a "wrong" AST in the sense of having different program behavior, but it's odd enough that it breaks a test (see patch in bug 630232).
Assignee: general → nobody
Severity: normal → S3

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.

Assignee: nobody → bthrall
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 127 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: