archives

« Bugzilla Issues Index

#2959 — B.3.2 Web Legacy Block Function: Handle duplicate block function declarations


B.3.2 Web Legacy Compatibility for Block-Level Function Declarations

Add new sub-step to 2.a.ii to track duplicate block level function declarations:
> Append F to instantiatedVarNames.


Test case:
---
function f() {
{ function g(){} }
{ function g(){} }
}
f()
---


fixed in rev26 editor's draft

Modified part b so that the var binding is updated on every such block level declaration evaluation which means that

function f() {
{ function g(){console.log(1)} }
{ function g(){console.log(2)} }
g();
}
f()

will not long "2" rather than "1". This is a better match to the legacy interoperable intersection semantics.


in rev26 draft