From 1a14725c32048eee4a525b21cdd598dabefc1dec Mon Sep 17 00:00:00 2001 From: Jason Freeman Date: Fri, 8 May 2015 15:35:42 -0700 Subject: [PATCH] Fix up two comments --- src/compiler/checker.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 911dc7dca91..d321ceae57f 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -7323,7 +7323,6 @@ module ts { type = checkExpressionCached(func.body, contextualMapper); } else { - // Aggregate the types of expressions within all the return statements. let types: Type[]; if (func.asteriskToken) { types = checkAndAggregateYieldOperandTypes(func.body, contextualMapper); @@ -7342,8 +7341,9 @@ module ts { return voidType; } } - // When return statements are contextually typed we allow the return type to be a union type. Otherwise we require the - // return expressions to have a best common supertype. + + // When yield/return statements are contextually typed we allow the return type to be a union type. + // Otherwise we require the yield/return expressions to have a best common supertype. type = contextualSignature ? getUnionType(types) : getCommonSupertype(types); if (!type) { if (func.asteriskToken) {