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

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • None
    • core-libs
    • None
    • 8
    • b08
    • generic
    • generic

        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.

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

                Created:
                Updated:
                Resolved: