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:
|
case SyntaxKind.BlockBody:
|
||||||
{
|
{
|
||||||
|
this.returnTypes.push(returnType);
|
||||||
for (const element of node.body.elements) {
|
for (const element of node.body.elements) {
|
||||||
this.infer(element);
|
this.infer(element);
|
||||||
}
|
}
|
||||||
|
this.returnTypes.pop();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue