Skip to content

Remove CFA discriminant check restrictions #36114

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 10, 2020
Merged

Remove CFA discriminant check restrictions #36114

merged 2 commits into from
Jan 10, 2020

Conversation

ahejlsberg
Copy link
Member

@ahejlsberg ahejlsberg commented Jan 10, 2020

In #10028 we added logic to reset control flow analysis based types following discriminant checks. This logic was really only needed in scenarios involving loops, and it now appears unnecessary, likely because of subsequent fixes in loop analysis that addressed the root issue.

Having thought about it some more, I can't come up with any examples that merit the code added in ade89a6, and removing it has no longer has adverse effects.

Fixes #36028.

@ahejlsberg
Copy link
Member Author

@typescript-bot test this
@typescript-bot user test this
@typescript-bot run dt

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 10, 2020

Heya @ahejlsberg, I've started to run the extended test suite on this PR at 766cb83. You can monitor the build here. It should now contribute to this PR's status checks.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 10, 2020

Heya @ahejlsberg, I've started to run the parallelized community code test suite on this PR at 766cb83. You can monitor the build here. It should now contribute to this PR's status checks.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 10, 2020

Heya @ahejlsberg, I've started to run the parallelized Definitely Typed test suite on this PR at 766cb83. You can monitor the build here. It should now contribute to this PR's status checks.

@typescript-bot
Copy link
Collaborator

The user suite test run you requested has finished and failed. I've opened a PR with the baseline diff from master.

@ahejlsberg
Copy link
Member Author

Tests look clean. All failures are preexisting conditions.

@ahejlsberg ahejlsberg merged commit 94271aa into master Jan 10, 2020
Kingwl pushed a commit to Kingwl/TypeScript that referenced this pull request Mar 4, 2020
* Remove unnecessary containsMatchingReferenceDiscriminant logic

* Accept new baselines
@jakebailey jakebailey deleted the fix36028 branch November 7, 2022 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Strict null check flow analysis broken by unrelated branch logic
3 participants