add missing bind calls to properly set parent on token nodes (#12057)

This commit is contained in:
Vladimir Matveev 2016-11-04 21:54:22 -07:00 committed by GitHub
parent 4a906143c6
commit ed4fead087

View File

@ -1234,9 +1234,11 @@ namespace ts {
const postExpressionLabel = createBranchLabel();
bindCondition(node.condition, trueLabel, falseLabel);
currentFlow = finishFlowLabel(trueLabel);
bind(node.questionToken);
bind(node.whenTrue);
addAntecedent(postExpressionLabel, currentFlow);
currentFlow = finishFlowLabel(falseLabel);
bind(node.colonToken);
bind(node.whenFalse);
addAntecedent(postExpressionLabel, currentFlow);
currentFlow = finishFlowLabel(postExpressionLabel);