-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Fix reachability analysis for ?? operator #34702
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
Conversation
|
@typescript-bot cherry-pick this to release-3.7 |
|
Hey @RyanCavanaugh, I've opened #34710 for you. |
src/compiler/utilities.ts
Outdated
| return isOptionalChainRoot(node.parent) && node.parent.expression === node; | ||
| } | ||
|
|
||
| export function isQuestionQuestionExpression(node: Node) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The analogous factory function is createNullishCoalesce, so I think this should be isNullishCoalesce.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I guess, though for the uninitiated, nullish coalesce is meaningless and question question is self-explanatory. But hey, gotta have something for the quizzes. 😏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How else do you expect me to rig TSConf trivia?
|
@typescript-bot cherry-pick this to release-3.7 |
|
Hey @DanielRosenwasser, I couldn't open a PR with the cherry-pick. (You can check the log here). You may need to squash and pick this PR into release-3.7 manually. |
Fixes #34635.