Fix type-checking return statements

This commit is contained in:
Sam Vervaeck 2022-08-31 13:54:47 +02:00
parent 12559e93a2
commit d2e6f9ed4f

View file

@ -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;
}
}