Reflect.parse on negative literals should be unary expressions?

RESOLVED WORKSFORME

Status

()

Core
JavaScript Engine
RESOLVED WORKSFORME
6 years ago
3 years ago

People

(Reporter: Gregg Lind (Fx Strategy and Insights - Shield - Heartbeat ), Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

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)

Updated

4 years ago
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})

Updated

3 years ago
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.