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

Need to restore for container block from lexical context in finally

    XMLWordPrintable

Details

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

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

                Dates

                  Created:
                  Updated:
                  Resolved: