File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -14478,8 +14478,8 @@ namespace ts {
14478
14478
if (produceDiagnostics && clause.kind === SyntaxKind.CaseClause) {
14479
14479
const caseClause = <CaseClause>clause;
14480
14480
// TypeScript 1.0 spec (April 2014): 5.9
14481
- // In a 'switch' statement, each 'case' expression must be of a type that is assignable to or from the type of the 'switch' expression.
14482
- // TODO (drosen): this needs to be amended to reflect the "comparable" relationship .
14481
+ // In a 'switch' statement, each 'case' expression must be of a type that is comparable
14482
+ // to or from the type of the 'switch' expression .
14483
14483
const caseType = checkExpression(caseClause.expression);
14484
14484
if (!isTypeComparableTo(expressionType, caseType)) {
14485
14485
// expressionType is not comparable to caseType, try the reversed check and report errors if it fails
You can’t perform that action at this time.
0 commit comments