Fix broken check in getUnionType (check was always true)

This commit is contained in:
Anders Hejlsberg
2019-02-15 06:22:17 -08:00
parent 3e745e65cd
commit 8f52f21f0d

View File

@@ -9359,7 +9359,7 @@ namespace ts {
}
switch (unionReduction) {
case UnionReduction.Literal:
if (includes & TypeFlags.StringOrNumberLiteralOrUnique | TypeFlags.BooleanLiteral) {
if (includes & (TypeFlags.Literal | TypeFlags.UniqueESSymbol)) {
removeRedundantLiteralTypes(typeSet, includes);
}
break;