Closed Bug 630218 Opened 14 years ago Closed 14 years ago

Reflect.parse("x.*") shouldn't mark the MemberExpression as computed

Categories

(Core :: JavaScript Engine, defect)

Other Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jorendorff, Assigned: jorendorff)

Details

(Whiteboard: [fixed-in-tracemonkey])

Attachments

(1 file)

Reflect.parse("x.*") is the same as Reflect.parse("x[*]"). This is a bug because they're two different programs. js> x = <x/>; <x/> js> x.* <-- empty XMLList js> x[*] typein:10: ReferenceError: reference to undefined XML name *::* Both ASTs contain a node with {type: "MemberExpression", computed: true}. The first one should have computed: false. Something similar goes for @x and @[x].
Attached patch v1Splinter Review
This adds a .computed property to XMLAttributeSelector nodes. (I ran across this bug while trying to test some Reflect.stringify code; see bug 590755.)
Assignee: general → jorendorff
Attachment #508425 - Flags: review?(dherman)
Comment on attachment 508425 [details] [diff] [review] v1 Good catch, thanks. r=me Dave
Attachment #508425 - Flags: review?(dherman) → review+
Whiteboard: [fixed-in-tracemonkey]
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: