We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c24df57 commit 8c44c88Copy full SHA for 8c44c88
src/compiler/checker.ts
@@ -17721,6 +17721,7 @@ namespace ts {
17721
// mark variables that are declared in loop initializer and reassigned inside the body of ForStatement.
17722
// if body of ForStatement will be converted to function then we'll need a extra machinery to propagate reassigned values back.
17723
if (container.kind === SyntaxKind.ForStatement &&
17724
+ symbol.valueDeclaration.kind === SyntaxKind.VariableDeclaration &&
17725
getAncestor(symbol.valueDeclaration, SyntaxKind.VariableDeclarationList)!.parent === container &&
17726
isAssignedInBodyOfForStatement(node, <ForStatement>container)) {
17727
getNodeLinks(symbol.valueDeclaration).flags |= NodeCheckFlags.NeedsLoopOutParameter;
0 commit comments