Skip to content

check if for loop parameters are reused incorrectly#19

Open
mardaravicius wants to merge 1 commit intoDivy1211:mainfrom
mardaravicius:check-for-for-loop-param-reuse
Open

check if for loop parameters are reused incorrectly#19
mardaravicius wants to merge 1 commit intoDivy1211:mainfrom
mardaravicius:check-for-for-loop-param-reuse

Conversation

@mardaravicius
Copy link
Copy Markdown
Contributor

attempt to fix the issue:
#16

added tests that check for various cases though not sure if i put the tests in the right place.

it works by introducing an active_loop_params map in the FnInfo that keeps track which for loop params are defined.

it seems that only for loop params are scoped in any way as all the other variables are either global or entire function scope.

there are many cases when for loop param can be reused or not. added tests to as many as i could think of

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