eval within a 'with' leaks definitions into global scope

XMLWordPrintable

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

        function func() {
            var obj = { foo: 344 };
            with (obj) {
               eval("var x = foo + 3");
            }
            print(x);
        }

        func();

        // should result in ReferenceError
        print(x);

              Assignee:
              Hannes Wallnoefer
              Reporter:
              Sundararajan Athijegannathan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: