mirror of
https://github.com/github/codeql.git
synced 2026-02-12 21:21:16 +01:00
Update javascript/extractor/src/com/semmle/js/extractor/CFGExtractor.java
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -1247,7 +1247,7 @@ public class CFGExtractor {
|
||||
public Void visit(BlockStatement nd, SuccessorInfo i) {
|
||||
// Hoist function declarations in a block statement to the top of the block.
|
||||
// This reflects non-standard behaviour implemented by most engines.
|
||||
// See also: EcmaScript "B.3.2 Block-Level Function Declarations Web Legacy Compatibility Semantics".
|
||||
// See also: ECMAScript "B.3.2 Block-Level Function Declarations Web Legacy Compatibility Semantics".
|
||||
List<Identifier> hoisted = HoistedFunDecls.of(nd.getBody());
|
||||
hoistedFns.addAll(hoisted);
|
||||
writeSuccessors(nd, visitSequence(hoisted, nd.getBody(), i.getAllSuccessors()));
|
||||
|
||||
Reference in New Issue
Block a user