archives

« Bugzilla Issues Index

#1420 — 10.2.1.1.5: SetMutableBinding allows changing the value of uninitialised bindings


Per step 3 of SetMutableBinding [10.2.1.1.5], the bound value of a binding can be altered regardless of its initialisation state. That means the following code is valid and does not throw:
---
function f() {
foo = 3;
return;
let foo;
}
---

Maybe this is just a side-effect of Function Declaration Instantiation [10.5.3] being still incomplete and not yet compliant to ES5 (test2626 test case S10.2.1_A4_T1 currently fails).


Looks to me like steps 3 and 4 need to be reversed.

Fixed in rev15 editor's draft.


resolved in rev 15, May 14, 2013 draft