JDK-8031317 : SyntaxError when property setter has no parameter
  • Type: Bug
  • Component: core-libs
  • Sub-Component: jdk.nashorn
  • Affected Version: 8u20
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2014-01-07
  • Updated: 2014-07-29
  • Resolved: 2014-01-14
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u20Fixed 9 b02Fixed
Description
Testcase:
var x = {
  get toto() {
  },
  set toto() { 
  }
}
nodejs on v8 is fine with this syntax. It doas impact ether-lite-pad
Comments
Fix pushed to nashorn/jdk9 forest: changeset: 689:3bbf629a2db9 tag: tip user: sundar date: Wed Jan 08 17:51:47 2014 +0530 summary: 8031317: SyntaxError when property setter has no parameter
08-01-2014

We likely have a parser requirement for at least one argument on the setter. It's a bad example case, but we should allow for it.
07-01-2014