Fix parsing

This commit is contained in:
Anders Hejlsberg
2018-01-19 13:01:27 -08:00
parent fd0dd6ed4c
commit c360c24b9b

View File

@@ -2887,11 +2887,11 @@ namespace ts {
if (parseOptional(SyntaxKind.ExtendsKeyword)) {
const node = <ConditionalTypeNode>createNode(SyntaxKind.ConditionalType, type.pos);
node.checkType = type;
node.extendsType = parseUnionTypeOrHigher();
node.extendsType = parseType();
parseExpected(SyntaxKind.QuestionToken);
node.trueType = parseConditionalTypeOrHigher();
node.trueType = parseType();
parseExpected(SyntaxKind.ColonToken);
node.falseType = parseConditionalTypeOrHigher();
node.falseType = parseType();
return finishNode(node);
}
return type;