Catch parameter can be a BindingPattern in ES6 mode

XMLWordPrintable

    • Type: Sub-task
    • Resolution: Fixed
    • Priority: P3
    • 9
    • Affects Version/s: 9
    • Component/s: core-libs
    • b145
    • generic
    • generic

      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

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

              Created:
              Updated:
              Resolved: