Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8024970 André Bargull's list on Sep 17, 2013
  3. JDK-8047959

bindings created for declarations in eval code are not mutable

    XMLWordPrintable

Details

    • Sub-task
    • Resolution: Fixed
    • P3
    • 9
    • 9
    • core-libs
    • None
    • b22
    • generic
    • generic

    Backports

      Description

        jjs> eval("var x = 10; print(delete x); print(typeof x)");


        Expected output:
        true
        undefined


        Actual output:
        false
        number

        jjs> eval("function func() {}; print(delete func); print(typeof func);");

        Expected output:
        true
        undefined

        Actual output:
        false
        function

        See http://es5.github.io/#x10.5 Declaration Binding Instantiation, step 2 says:

        "If code is eval code, then let configurableBindings be true else let configurableBindings be false."

        subsequent steps of the spec use "configurableBindings" flag.

        Attachments

          Issue Links

            Activity

              People

                sundar Sundararajan Athijegannathan
                sundar Sundararajan Athijegannathan
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: