Skip to content

Commit b31b417

Browse files
committed
Try something
1 parent 776ddb4 commit b31b417

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/compiler/checker.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19004,8 +19004,8 @@ namespace ts {
1900419004
return key = getFlowCacheKey(reference, declaredType, initialType, flowContainer);
1900519005
}
1900619006

19007-
function captureContainingUnion(flow: FlowNode, type: FlowType) {
19008-
if (flow.flags & (FlowFlags.Assignment | FlowFlags.Condition) && !isIncomplete(type) && type.flags & TypeFlags.Union) {
19007+
function captureContainingUnion(type: FlowType) {
19008+
if (!isIncomplete(type) && type.flags & TypeFlags.Union) {
1900919009
containingUnion = type as UnionType;
1901019010
}
1901119011
}
@@ -19029,7 +19029,7 @@ namespace ts {
1902919029
for (let i = sharedFlowStart; i < sharedFlowCount; i++) {
1903019030
if (sharedFlowNodes[i] === flow) {
1903119031
flowDepth--;
19032-
captureContainingUnion(flow, sharedFlowTypes[i]);
19032+
captureContainingUnion(sharedFlowTypes[i]);
1903319033
return sharedFlowTypes[i];
1903419034
}
1903519035
}
@@ -19107,7 +19107,7 @@ namespace ts {
1910719107
sharedFlowTypes[sharedFlowCount] = type;
1910819108
sharedFlowCount++;
1910919109
}
19110-
captureContainingUnion(flow, type);
19110+
captureContainingUnion(type);
1911119111
flowDepth--;
1911219112
return type;
1911319113
}

0 commit comments

Comments
 (0)