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

Don't leak local variables between switch branches #1450

Merged
merged 2 commits into from
Sep 22, 2024

Commits on Sep 22, 2024

  1. Don't leak local variables between switch branches

    Declaring and initializing a local variable in one `switch` branch, then
    using that same local variable in a different `switch` branch, is legal
    but confusing.  Even more so if the first switch branch returns rather
    than falling through.  Let's just not do that.
    liblit committed Sep 22, 2024
    Configuration menu
    Copy the full SHA
    6822b0a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c957c7b View commit details
    Browse the repository at this point in the history