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

Need to restore for container block from lexical context in finally

XMLWordPrintable

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

        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;
         }

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

                Created:
                Updated:
                Resolved: