Skip to content

Commit

Permalink
getRegularTypeOfLiteralType before exhaustive switch check
Browse files Browse the repository at this point in the history
  • Loading branch information
ahejlsberg committed Nov 28, 2016
1 parent 5b873fa commit 9065b50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13850,7 +13850,7 @@ namespace ts {
if (!switchTypes.length) {
return false;
}
return eachTypeContainedIn(type, switchTypes);
return eachTypeContainedIn(mapType(type, getRegularTypeOfLiteralType), switchTypes);
}

function functionHasImplicitReturn(func: FunctionLikeDeclaration) {
Expand Down

0 comments on commit 9065b50

Please sign in to comment.