Undo comment override from merge.

This commit is contained in:
Daniel Rosenwasser
2016-03-30 01:03:32 -07:00
parent a3faca57d0
commit 3cc64cbd29

View File

@@ -14478,8 +14478,8 @@ namespace ts {
if (produceDiagnostics && clause.kind === SyntaxKind.CaseClause) {
const caseClause = <CaseClause>clause;
// TypeScript 1.0 spec (April 2014): 5.9
// In a 'switch' statement, each 'case' expression must be of a type that is assignable to or from the type of the 'switch' expression.
// TODO (drosen): this needs to be amended to reflect the "comparable" relationship.
// In a 'switch' statement, each 'case' expression must be of a type that is comparable
// to or from the type of the 'switch' expression.
const caseType = checkExpression(caseClause.expression);
if (!isTypeComparableTo(expressionType, caseType)) {
// expressionType is not comparable to caseType, try the reversed check and report errors if it fails