Skip to content
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

Assorted InfiniteRecursion perfectionism: #4697

Merged
merged 1 commit into from
Nov 23, 2024
Merged

Conversation

copybara-service[bot]
Copy link
Contributor

Assorted InfiniteRecursion perfectionism:

  • Complain about recursive calls even if they come after catch (SomeException e) { return; }, and attempt to clarify how this fits into how we otherwise treat exceptions. (This follows through on my post-submit comment from d70a18c.)
  • Test that handling of switch expressions falls naturally out of the existing code, since it looks for CaseTree and not SwitchTree (and thus doesn't need an update for SwitchExpressionTree).
  • Leave a comment about how we could get even better handling of both kinds of switch, plus if and ?: and maybe more, if we wanted to check whether all branches make recursive calls. (Such an approach likely would lead us to look for SwitchTree and SwitchExpressionTree, rather than just CaseTree.)

- Complain about recursive calls even if they come after `catch (SomeException e) { return; }`, and attempt to clarify how this fits into how we otherwise treat exceptions. (This follows through on my post-submit comment from d70a18c.)
- Test that handling of switch expressions falls naturally out of the existing code, since it looks for `CaseTree` and not `SwitchTree` (and thus doesn't need an update for `SwitchExpressionTree`).
- Leave a comment about how we _could_ get _even better_ handling of both kinds of `switch`, plus `if` and `?:` and maybe more, if we wanted to check whether all branches make recursive calls. (Such an approach likely _would_ lead us to look for `SwitchTree` and `SwitchExpressionTree`, rather than just `CaseTree`.)

PiperOrigin-RevId: 699467832
@copybara-service copybara-service bot merged commit 405b5c2 into master Nov 23, 2024
@copybara-service copybara-service bot deleted the test_699237373 branch November 23, 2024 13:56
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.

1 participant