Add hopefully helpful comment

This commit is contained in:
Jason Freeman 2015-06-02 17:54:08 -07:00
parent 46da6678ad
commit 22cc3a7d84

View File

@ -7455,6 +7455,11 @@ module ts {
if (node.body) {
if (!node.type) {
// There are some checks that are only performed in getReturnTypeFromBody, that may produce errors
// we need. An example is the noImplicitAny errors resulting from widening the return expression
// of a function. Because checking of function expression bodies is deferred, there was never an
// appropriate time to do this during the main walk of the file (see the comment at the top of
// checkFunctionExpressionBodies). So it must be done now.
getReturnTypeOfSignature(getSignatureFromDeclaration(node));
}