mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
Reuse temp variable scope for converted loop body
This commit is contained in:
@@ -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