Nashorn incorrectly identifies some code as dead

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P3
    • 10
    • Affects Version/s: 9
    • Component/s: core-libs
    • None

      print((function() { L: { { break L; } throw x; } return "hello world"; })());

      prints "undefined" instead of "hello world".

      Note that taking away {} from around the break statement produces the correct result:

      print((function() { L: { break L; throw x; } return "hello world"; })());

            Assignee:
            Priya Lakshmi Muthuswamy (Inactive)
            Reporter:
            Attila Szegedi
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: