diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 6efc4ae05b0..5006e841dc7 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -1032,12 +1032,12 @@ namespace ts { function bindForInOrForOfStatement(node: ForInOrOfStatement): void { const preLoopLabel = createLoopLabel(); const postLoopLabel = createBranchLabel(); + bind(node.expression); addAntecedent(preLoopLabel, currentFlow); currentFlow = preLoopLabel; if (node.kind === SyntaxKind.ForOfStatement) { bind(node.awaitModifier); } - bind(node.expression); addAntecedent(postLoopLabel, currentFlow); bind(node.initializer); if (node.initializer.kind !== SyntaxKind.VariableDeclarationList) {