Fix of #58996 - #59155
Conversation
|
@microsoft-github-policy-service agree |
| // This means that if the function is called with an argument of type trueType, there can't be anything left in the `else` branch. It must reduce to `never`. | ||
| const falseCondition = createFlowNode(FlowFlags.FalseCondition, expr, antecedent); | ||
| const falseSubtype = getFlowTypeOfReference(param.name, initType, trueType, func, falseCondition); | ||
| const falseSubtype = getReducedType(getFlowTypeOfReference(param.name, initType, trueType, func, falseCondition)); |
There was a problem hiding this comment.
Nice find 👍
|
TypeScript Bot (@typescript-bot) test it |
|
Hey Jake Bailey (@jakebailey), the results of running the DT tests are ready. Everything looks the same! |
|
Jake Bailey (@jakebailey) Here are the results of running the user tests with tsc comparing Everything looks good! |
|
Jake Bailey (@jakebailey) Here they are:
tscComparison Report - baseline..pr
System info unknown
Hosts
Scenarios
Developer Information: |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Jake Bailey (@jakebailey) Here are the results of running the top 400 repos with tsc comparing Everything looks good! |
Jake Bailey (jakebailey)
left a comment
There was a problem hiding this comment.
I believe this is correct, yes?
|
I think I meant to merge this back when I reviewed it; I can merge main if you'd like. |
|
Sure! |
Backlogmilestone (required)mainbranchhereby runtestslocallyFixes #58996
The issue was that the type
Animal & Rockwas not getting reduced toneverand therefore the check failed.