Closed Bug 789979 Opened 12 years ago Closed 9 years ago

Reflect.parse on negative literals should be unary expressions?

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: glind, Unassigned)

References

Details

(Whiteboard: reflect-parse[js:p3])

js> Reflect.parse('a=-1').body[0].expression.right
({loc:{start:{line:1, column:2}, end:{line:1, column:4}, source:null}, type:"Literal", value:-1})

> esprima.parse("a=-1").body[0].expression.right
{ type: 'UnaryExpression',
  operator: '-',
  argument: { type: 'Literal', value: 1 } }
Whiteboard: reflect-parse → reflect-parse[js:p3]
Assignee: general → nobody
No longer reproducible - Resolving as WFM.

js> Reflect.parse('a=-1').body[0].expression.right
({loc:{start:{line:1, column:2}, end:{line:1, column:4}, source:null}, type:"UnaryExpression", operator:"-", argument:{loc:{start:{line:1, column:3}, end:{line:1, column:4}, source:null}, type:"Literal", value:1}, prefix:true})
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.