Closed
Bug 784358
Opened 13 years ago
Closed 13 years ago
Defining const variable within eval() throws redeclaration error
Categories
(Rhino Graveyard :: Core, defect)
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.
Comment 1•13 years ago
|
||
Pull request at https://github.com/mozilla/rhino/pull/83
Comment 2•13 years ago
|
||
Thanks André, merged to master:
https://github.com/mozilla/rhino/commit/49648dc502406fabe1f932424abd57d32e51e3b8
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.
Description
•