File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -7899,11 +7899,14 @@ module ts {
7899
7899
}
7900
7900
}
7901
7901
7902
- function checkYieldExpression(node: YieldExpression): void {
7902
+ function checkYieldExpression(node: YieldExpression): Type {
7903
7903
// Grammar checking
7904
7904
if (!(node.parserContextFlags & ParserContextFlags.Yield)) {
7905
7905
grammarErrorOnFirstToken(node, Diagnostics.A_yield_expression_is_only_allowed_in_a_generator_declaration);
7906
7906
}
7907
+
7908
+ // Both yield and yield* expressions are any
7909
+ return anyType;
7907
7910
}
7908
7911
7909
7912
function checkConditionalExpression(node: ConditionalExpression, contextualMapper?: TypeMapper): Type {
@@ -8093,8 +8096,7 @@ module ts {
8093
8096
case SyntaxKind.OmittedExpression:
8094
8097
return undefinedType;
8095
8098
case SyntaxKind.YieldExpression:
8096
- checkYieldExpression(<YieldExpression>node);
8097
- return unknownType;
8099
+ return checkYieldExpression(<YieldExpression>node);
8098
8100
}
8099
8101
return unknownType;
8100
8102
}
You can’t perform that action at this time.
0 commit comments