Eagerly reduce empty intersections to 'never'
This commit is contained in:
parent
8705844879
commit
aab3004482
|
@ -9956,6 +9956,9 @@ namespace ts {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
result = createIntersectionType(typeSet, aliasSymbol, aliasTypeArguments);
|
result = createIntersectionType(typeSet, aliasSymbol, aliasTypeArguments);
|
||||||
|
if (isEmptyIntersectionType(<IntersectionType>result)) {
|
||||||
|
result = neverType;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
intersectionTypes.set(id, result);
|
intersectionTypes.set(id, result);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue