Skip to content

Commit 9065b50

Browse files
committed
getRegularTypeOfLiteralType before exhaustive switch check
1 parent 5b873fa commit 9065b50

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13850,7 +13850,7 @@ namespace ts {
1385013850
if (!switchTypes.length) {
1385113851
return false;
1385213852
}
13853-
return eachTypeContainedIn(type, switchTypes);
13853+
return eachTypeContainedIn(mapType(type, getRegularTypeOfLiteralType), switchTypes);
1385413854
}
1385513855

1385613856
function functionHasImplicitReturn(func: FunctionLikeDeclaration) {

0 commit comments

Comments
 (0)