Closed Bug 784358 Opened 13 years ago Closed 13 years ago

Defining const variable within eval() throws redeclaration error

Categories

(Rhino Graveyard :: Core, defect)

head
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bugzilla, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.79 Safari/537.1 Steps to reproduce: Using Rhino 1.7 release 4 2012 06 18 I executed the following one line script: eval("const a = 5;"); Actual results: Rhino throws the following error: line 1: TypeError: redeclaration of var a. Expected results: It should have defined the constant a.
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.