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

    • Type: Sub-task
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b22
    • CPU:
      generic
    • OS:
      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

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

                  Dates

                  Created:
                  Updated:
                  Resolved: