mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-31 18:10:56 -05:00
Fix flow node improper reuse (#60662)
This commit is contained in:
committed by
GitHub
parent
9bf5aa7fe2
commit
6b1ea96b94
@@ -21,6 +21,7 @@ import {
|
||||
BreakOrContinueStatement,
|
||||
CallChain,
|
||||
CallExpression,
|
||||
canHaveFlowNode,
|
||||
canHaveLocals,
|
||||
canHaveSymbol,
|
||||
CaseBlock,
|
||||
@@ -1104,6 +1105,9 @@ function createBinder(): (file: SourceFile, options: CompilerOptions) => void {
|
||||
// and set it before we descend into nodes that could actually be part of an assignment pattern.
|
||||
inAssignmentPattern = false;
|
||||
if (checkUnreachable(node)) {
|
||||
if (canHaveFlowNode(node) && node.flowNode) {
|
||||
node.flowNode = undefined;
|
||||
}
|
||||
bindEachChild(node);
|
||||
bindJSDoc(node);
|
||||
inAssignmentPattern = saveInAssignmentPattern;
|
||||
|
||||
Reference in New Issue
Block a user