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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 9
    • None
    • core-libs
    • None
    • 8
    • b08
    • generic
    • 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

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

                Dates

                  Created:
                  Updated:
                  Resolved: