getRegularTypeOfLiteralType before exhaustive switch check

This commit is contained in:
Anders Hejlsberg
2016-11-28 10:53:25 -08:00
parent 5b873fa041
commit 9065b50172

View File

@@ -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) {