Fix parent points in unreachable code (#27400) (#27406)

In the binder, unreachable code mistakenly skips the `bindJSDoc` call in
`bindChildrenWorker`, which sets parent pointers. The fix is to call
`bindJSDoc` in the case of unreachable code as well.
This commit is contained in:
Nathan Shively-Sanders
2018-09-28 08:31:56 -07:00
committed by GitHub
parent bde81deed2
commit 6d92a2942f
4 changed files with 39 additions and 0 deletions

View File

@@ -640,6 +640,7 @@ namespace ts {
function bindChildrenWorker(node: Node): void {
if (checkUnreachable(node)) {
bindEachChild(node);
bindJSDoc(node);
return;
}
switch (node.kind) {