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
Code path analysis for (a && b) ?? c #13614
Comments
This is a similar issue to #13634. I believe we can fix both in semver-minor changes. |
Unfortunately, it looks like there wasn't enough interest from the team Thanks for contributing to ESLint and we appreciate your understanding. |
friendly ping @mdjermanovic is this still an issue we want to address? |
Yes, we should fix this. |
Working on this. |
* fix: Ensure correct code path for && followed by ?? fixes #13614 * Remove .only * Update lib/linter/code-path-analysis/code-path-state.js Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * Update tests/lib/linter/code-path-analysis/code-path-analyzer.js Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * Update variable names in comments --------- Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
Tell us about your environment
What parser (default,
@babel/eslint-parser
,@typescript-eslint/parser
, etc.) are you using?default
Please show your full configuration:
Configuration
What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.
The rest of the bug report template isn't quite suitable for this issue.
Code path analysis gives the following:
DOT
Image
This would be correct for
(a || b) ?? c
, but I think it isn't entirely correct for(a && b) ?? c
since there should be a path froma
toc
that doesn't go throughb
:The text was updated successfully, but these errors were encountered: