Updates:
        Status: WorkingAsIntended
        Owner: [email protected]

Comment #1 on issue 2311 by [email protected]: Inconsistent closure behaviour in "with" statement.
http://code.google.com/p/v8/issues/detail?id=2311

The first snippet is not actually legal ES5, because function declarations are only allowed at global or function scope. Existing implementations allow local function declarations, but wildly differ in their behaviour -- V8 usually follows Safari in such cases.

Because ES5 lacks block scoping and thus requires hoisting of declarations, there is no reasonable semantics that can be given to local function declarations. This will be fixed with the upcoming ES6, which introduces proper scoping and legalizes local function declarations based on that.


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to