mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Always cache union and intersection relations
This commit is contained in:
@@ -18207,7 +18207,7 @@ namespace ts {
|
||||
let result = Ternary.False;
|
||||
const saveErrorInfo = captureErrorCalculationState();
|
||||
|
||||
if ((source.flags & TypeFlags.Union || target.flags & TypeFlags.Union) && getConstituentCount(source) * getConstituentCount(target) < 4) {
|
||||
if ((source.flags & TypeFlags.Union || target.flags & TypeFlags.Union) && getConstituentCount(source) * getConstituentCount(target) < 0) {
|
||||
// We skip caching when source or target is a union with no more than three constituents.
|
||||
result = structuredTypeRelatedTo(source, target, reportErrors, intersectionState | IntersectionState.UnionIntersectionCheck);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user