bindings created for declarations in eval code are not mutable

XMLWordPrintable

    • Type: Sub-task
    • Resolution: Fixed
    • Priority: P3
    • 9
    • Affects Version/s: 9
    • Component/s: 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.

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

                Created:
                Updated:
                Resolved: