Skip to content

Commit ed4fead

Browse files
authored
add missing bind calls to properly set parent on token nodes (#12057)
1 parent 4a90614 commit ed4fead

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/compiler/binder.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1234,9 +1234,11 @@ namespace ts {
12341234
const postExpressionLabel = createBranchLabel();
12351235
bindCondition(node.condition, trueLabel, falseLabel);
12361236
currentFlow = finishFlowLabel(trueLabel);
1237+
bind(node.questionToken);
12371238
bind(node.whenTrue);
12381239
addAntecedent(postExpressionLabel, currentFlow);
12391240
currentFlow = finishFlowLabel(falseLabel);
1241+
bind(node.colonToken);
12401242
bind(node.whenFalse);
12411243
addAntecedent(postExpressionLabel, currentFlow);
12421244
currentFlow = finishFlowLabel(postExpressionLabel);

0 commit comments

Comments
 (0)