Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8039047

Parser accepts conditional catch clauses even when --no-syntax-extensions / -nse option is passed

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Introduced In Version:
      8
    • Resolved In Build:
      b08
    • CPU:
      generic
    • OS:
      generic

      Backports

        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.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  sundar Sundararajan Athijegannathan
                  Reporter:
                  sundar Sundararajan Athijegannathan
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: