Skip to content

Commit 6462dd4

Browse files
committed
Port "Fix flow node improper reuse"
1 parent a92eff4 commit 6462dd4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

internal/binder/binder.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1565,6 +1565,10 @@ func (b *Binder) bindChildren(node *ast.Node) {
15651565
// and set it before we descend into nodes that could actually be part of an assignment pattern.
15661566
b.inAssignmentPattern = false
15671567
if b.checkUnreachable(node) {
1568+
hasFlowNodeData := node.FlowNodeData()
1569+
if hasFlowNodeData != nil {
1570+
hasFlowNodeData.FlowNode = nil
1571+
}
15681572
b.setJSDocParents(node)
15691573
b.bindEachChild(node)
15701574
b.inAssignmentPattern = saveInAssignmentPattern

0 commit comments

Comments
 (0)