mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-11-18 20:11:14 +00:00
Merge pull request #41791 from microsoft/fix40643
Reuse temp variable scope for converted loop body
This commit is contained in:
10 files changed
+72
-36
No files matched your search
@@ -3155,7 +3155,7 @@ namespace ts {
|
||||
|
||||
const containsYield = (node.statement.transformFlags & TransformFlags.ContainsYield) !== 0;
|
||||
|
||||
let emitFlags: EmitFlags = 0;
|
||||
let emitFlags: EmitFlags = EmitFlags.ReuseTempVariableScope;
|
||||
if (currentState.containsLexicalThis) emitFlags |= EmitFlags.CapturesThis;
|
||||
if (containsYield && (hierarchyFacts & HierarchyFacts.AsyncFunctionBody) !== 0) emitFlags |= EmitFlags.AsyncFunctionBody;
|
||||
|
||||
|
||||
Reference in new issue
Block a user