Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8134503 support ES6 parsing in Nashorn
  3. JDK-8156615

Catch parameter can be a BindingPattern in ES6 mode

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b145
    • CPU:
      generic
    • OS:
      generic

      Description

      D:\src\jdk9-dev\build\windows-x86_64-normal-server-release\images\jdk\bin>.\jjs
       --language=es6
      jjs> try { } catch ({foo }) {}
      ECMAScript Exception: SyntaxError: <shell>:1:15 Expected ident but found {
      try { } catch ({foo }) {}
                     ^

      CatchParameter is BindingIdentifier or BindingPattern

      See : http://www.ecma-international.org/ecma-262/6.0/#sec-try-statement

        Attachments

          Activity

            People

            Assignee:
            sdama Srinivas Dama (Inactive)
            Reporter:
            sundar Sundararajan Athijegannathan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: