Skip to content

Commit 1866d05

Browse files
committed
Rename variable in checkSwitchStatement per PR
1 parent d58a13f commit 1866d05

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/compiler/checker.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16906,14 +16906,14 @@ namespace ts {
1690616906
// to or from the type of the 'switch' expression.
1690716907
let caseType = checkExpression(caseClause.expression);
1690816908
const caseIsLiteral = isLiteralType(caseType);
16909-
let literalExpressionType = expressionType;
16909+
let comparedExpressionType = expressionType;
1691016910
if (!caseIsLiteral || !expressionIsLiteral) {
1691116911
caseType = caseIsLiteral ? getBaseTypeOfLiteralType(caseType) : caseType;
16912-
literalExpressionType = getBaseTypeOfLiteralType(expressionType);
16912+
comparedExpressionType = getBaseTypeOfLiteralType(expressionType);
1691316913
}
16914-
if (!isTypeEqualityComparableTo(literalExpressionType, caseType)) {
16914+
if (!isTypeEqualityComparableTo(comparedExpressionType, caseType)) {
1691516915
// expressionType is not comparable to caseType, try the reversed check and report errors if it fails
16916-
checkTypeComparableTo(caseType, literalExpressionType, caseClause.expression, /*headMessage*/ undefined);
16916+
checkTypeComparableTo(caseType, comparedExpressionType, caseClause.expression, /*headMessage*/ undefined);
1691716917
}
1691816918
}
1691916919
forEach(clause.statements, checkSourceElement);

0 commit comments

Comments
 (0)