For each FunctionDeclaration fin varDeclarations that is directly contained in the |StatementList| of a |Block|, |CaseClause|, or |DefaultClause|,
to
For each FunctionDeclaration f that is directly contained in the |StatementList| of a |Block|, |CaseClause|, or |DefaultClause| Contained within code,
(emphasis mine).
2015-10-29:
@anba submits PR #141, claiming to fix bug 4427.
It deletes "in varDeclarations", but doesn't add "Contained within code".
My guess is, this was just an oversight.
2015-11-02:
PR #141 is merged to master as commit efbfc88.
2022-02-13:
@nicolo-ribaudo raises issue #2663 about this,
and says he'd open a PR to fix it, but I don't think that happened.
This PR completes a small bugfix from 9 years ago.
Fixes #2663.
History:
2015-07-17: @bakkot identifies a problem in Annex B's "Changes to FunctionDeclarationInstantiation": https://esdiscuss.org/topic/block-level-function-declarations-web-legacy-compatibility-bug
To remedy this, @allenwb submits bug 4427: https://tc39.es/archives/bugzilla/4427/ in which he recommends changing
to
(emphasis mine).
2015-10-29: @anba submits PR #141, claiming to fix bug 4427. It deletes "in varDeclarations", but doesn't add "Contained within code". My guess is, this was just an oversight.
2015-11-02: PR #141 is merged to master as commit efbfc88.
2022-02-13: @nicolo-ribaudo raises issue #2663 about this, and says he'd open a PR to fix it, but I don't think that happened.
2024-06-26: @gibson042 raises the problem again, in a commment on PR #2952: https://github.com/tc39/ecma262/pull/2952#discussion_r1655601962