JDK-8039047 : Parser accepts conditional catch clauses even when --no-syntax-extensions / -nse option is passed
  • Type: Bug
  • Component: core-libs
  • Sub-Component: jdk.nashorn
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2014-04-02
  • Updated: 2014-07-29
  • Resolved: 2014-04-02
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 b08Fixed
Description
File: test.js

try {
    func()
} catch (e if e instanceof ReferenceError) {
    print("Got ReferenceError " + e);
}

jjs --no-syntax-extensions test.js

Expected: syntax error for conditional catch clause
Observed: no syntax error.