Return expressions always need to be type checked

This commit is contained in:
Jason Freeman
2015-06-02 17:33:57 -07:00
parent f83d54b18f
commit 46da6678ad
5 changed files with 22 additions and 1 deletions

View File

@@ -7454,6 +7454,10 @@ module ts {
}
if (node.body) {
if (!node.type) {
getReturnTypeOfSignature(getSignatureFromDeclaration(node));
}
if (node.body.kind === SyntaxKind.Block) {
checkSourceElement(node.body);
}