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

Nashorn incorrectly identifies some code as dead

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P3
    • 10
    • 9
    • core-libs
    • None

    Description

      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"; })());

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: