Skip to content

Commit 1f31bc7

Browse files
Addressed CR feedback.
1 parent 0ccc8d0 commit 1f31bc7

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/compiler/checker.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7081,9 +7081,7 @@ namespace ts {
70817081
switch (expr.kind) {
70827082
case SyntaxKind.Identifier:
70837083
case SyntaxKind.PropertyAccessExpression:
7084-
case SyntaxKind.QualifiedName:
7085-
// TODO (drosen): Why a qualified name?
7086-
return getSymbolOfEntityNameOrPropertyAccessExpression(expr as Node as (EntityName | PropertyAccessExpression));
7084+
return getSymbolOfEntityNameOrPropertyAccessExpression(expr as (Identifier | PropertyAccessExpression));
70877085
}
70887086
}
70897087

@@ -10469,13 +10467,13 @@ namespace ts {
1046910467
return aggregatedTypes;
1047010468
}
1047110469

10472-
/**
10470+
/**
1047310471
* TypeScript Specification 1.0 (6.3) - July 2014
1047410472
* An explicitly typed function whose return type isn't the Void type,
1047510473
* the Any type, or a union type containing the Void or Any type as a constituent
1047610474
* must have at least one return statement somewhere in its body.
1047710475
* An exception to this rule is if the function implementation consists of a single 'throw' statement.
10478-
*
10476+
*
1047910477
* @param returnType - return type of the function, can be undefined if return type is not explicitly specified
1048010478
*/
1048110479
function checkAllCodePathsInNonVoidFunctionReturnOrThrow(func: FunctionLikeDeclaration, returnType: Type): void {

src/compiler/parser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1940,7 +1940,7 @@ namespace ts {
19401940
return finishNode(node);
19411941
}
19421942

1943-
function parseThisTypePredicate(lhs: Identifier | ThisTypeNode): TypePredicateNode {
1943+
function parseThisTypePredicate(lhs: ThisTypeNode): TypePredicateNode {
19441944
nextToken();
19451945
const node = createNode(SyntaxKind.TypePredicate, lhs.pos) as TypePredicateNode;
19461946
node.parameterName = lhs;

0 commit comments

Comments
 (0)