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

feat: Allow shadowing by default #2000

Merged
merged 1 commit into from
Jul 23, 2023
Merged

feat: Allow shadowing by default #2000

merged 1 commit into from
Jul 23, 2023

Conversation

jfecher
Copy link
Contributor

@jfecher jfecher commented Jul 21, 2023

Description

Problem*

Summary*

Match rust by allowing variable shadowing by default for local variables.

Documentation

  • This PR requires documentation updates when merged.

    • I will submit a noir-lang/docs PR.
    • I will request for and support Dev Rel's help in documenting this PR.
      • When declaring variables, they may now shadow previous names.
      • This means we can declare a new variable of the same name as a previous variable.
      • The previous variable will not be modified, but it will be inaccessible until the new variable goes out of scope.

Additional Context

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

@kevaundray kevaundray added this pull request to the merge queue Jul 23, 2023
Merged via the queue into master with commit 88a4f74 Jul 23, 2023
@kevaundray kevaundray deleted the jf/shadowing branch July 23, 2023 16:37
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.

2 participants