JDK-8024712 : Nashorn Parser does not recognize const
  • Type: Bug
  • Component: core-libs
  • Sub-Component: jdk.nashorn
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2013-08-26
  • Updated: 2013-11-05
  • Resolved: 2013-11-05
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :


A DESCRIPTION OF THE PROBLEM :
Many Javascript engines recognize const.
Netbeans (and probably other) software rely on the Nashorn parser, for developers using these Sun derived products to develop specifically for Javascript engines that provide Const functionality.
This is broken using the Nashorn parser.

If you're on the fence about supporting const, at least make a command-line switch for it.

https://netbeans.org/bugzilla/show_bug.cgi?id=226477


REPRODUCIBILITY :
This bug can be reproduced always.
Comments
Too long of a task for JDK8
29-10-2013

Partial solution patch.
17-10-2013

Postponing to a 8u release. Complex issue, semantics are different between ES5 and ES6 and between vendors. Needs major work.
16-10-2013

const is not part of the EA5 spec and the semantics used by V8 does not match EA6 spec. The plan was to include this work with 'let' in the EA6 JEP. It's worth reconsidering. If introduced for JDK8, we should use the EA6 specification.
12-09-2013