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

Constant folding removes var statement

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 8
    • Fix Version/s: 8
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b113
    • CPU:
      generic
    • OS:
      generic

      Description

      The following script:
      if (false) var foo = 42; print(foo);

      produces:
      <shell>:1 ReferenceError: "foo" is not defined

      It should print:
      undefined

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hannesw Hannes Wallnoefer
                Reporter:
                hannesw Hannes Wallnoefer
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: