Constant folding removes var statement

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 8
    • Affects Version/s: 8
    • Component/s: core-libs
    • None
    • b113
    • generic
    • generic

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

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

      It should print:
      undefined

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

              Created:
              Updated:
              Resolved: