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

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

        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.

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

                Created:
                Updated:
                Resolved: