Fix parent points in unreachable code (#27400)

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-27 16:11:46 -07:00
committed by GitHub
parent b77cb2ac45
commit f23845aa9b
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) {