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

Need to restore for container block from lexical context in finally

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
      None

      Backports

        Description

        with -J-esa --language=es6, the following code throws an AssertionError because the for container block is not popped from lexical scope on exception:
         try {
           eval("function f() { for (x : y) { } }");
           throw "should not reach here";
         } catch (e) {
           if (!(e instanceof SyntaxError)) throw e;
         }

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                aw Andreas Woess
                Reporter:
                aw Andreas Woess
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: