Fix type-checking return statements
This commit is contained in:
parent
12559e93a2
commit
d2e6f9ed4f
1 changed files with 2 additions and 0 deletions
|
@ -524,9 +524,11 @@ export class Checker {
|
|||
}
|
||||
case SyntaxKind.BlockBody:
|
||||
{
|
||||
this.returnTypes.push(returnType);
|
||||
for (const element of node.body.elements) {
|
||||
this.infer(element);
|
||||
}
|
||||
this.returnTypes.pop();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue