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

Delete fails over multiple scopes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • 8
    • core-libs
    • None
    • b75
    • generic
    • generic

        The following code currently does not delete global property "p". It prints "number" instead of "undefined".

        p = 3;

        function f() {
            delete p;
            var x; // force creation of scope
            function b() { print(x); }
        }

        f();
        print(typeof p);

              hannesw Hannes Wallnoefer
              hannesw Hannes Wallnoefer
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: