From 1f31bc7b09a61a034ac99c6ee9cf45f5b3f84561 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 10 Feb 2016 15:19:27 -0800 Subject: [PATCH] Addressed CR feedback. --- src/compiler/checker.ts | 8 +++----- src/compiler/parser.ts | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 220b845d771..bbf1b68abb5 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -7081,9 +7081,7 @@ namespace ts { switch (expr.kind) { case SyntaxKind.Identifier: case SyntaxKind.PropertyAccessExpression: - case SyntaxKind.QualifiedName: - // TODO (drosen): Why a qualified name? - return getSymbolOfEntityNameOrPropertyAccessExpression(expr as Node as (EntityName | PropertyAccessExpression)); + return getSymbolOfEntityNameOrPropertyAccessExpression(expr as (Identifier | PropertyAccessExpression)); } } @@ -10469,13 +10467,13 @@ namespace ts { return aggregatedTypes; } - /** + /** * TypeScript Specification 1.0 (6.3) - July 2014 * An explicitly typed function whose return type isn't the Void type, * the Any type, or a union type containing the Void or Any type as a constituent * must have at least one return statement somewhere in its body. * An exception to this rule is if the function implementation consists of a single 'throw' statement. - * + * * @param returnType - return type of the function, can be undefined if return type is not explicitly specified */ function checkAllCodePathsInNonVoidFunctionReturnOrThrow(func: FunctionLikeDeclaration, returnType: Type): void { diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 08d8cb3ed0b..e67253dce92 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -1940,7 +1940,7 @@ namespace ts { return finishNode(node); } - function parseThisTypePredicate(lhs: Identifier | ThisTypeNode): TypePredicateNode { + function parseThisTypePredicate(lhs: ThisTypeNode): TypePredicateNode { nextToken(); const node = createNode(SyntaxKind.TypePredicate, lhs.pos) as TypePredicateNode; node.parameterName = lhs;