Closed Bug 386221 Opened 19 years ago Closed 19 years ago

E4X attribute setter returns wrong value

Categories

(Core :: JavaScript Engine, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 312354

People

(Reporter: nanto, Unassigned)

Details

ECMA-357 2nd 11.6 doesn't deal with a return value of simple assignment expressions. So |LeftHandSideExpression = AssignmentExpression| should return the value of AssignmentExpression according to ECMA-262 3rd 11.13.1, regardless of whether LeftHandSideExpression is XML/XMLList or not. But assignment expressions return the value of LeftHandSideExpression when you assign a value to XML attribute. js> x = <><a>foo</a><a>bar</a></> <a>foo</a> <a>bar</a> js> y = <a/> js> z = y.@attr = x foo bar js> z == x false z becomes a string "foo bar" but should become an XMLList <><a>foo</a><a>bar</a></> and z == x should be true.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.