You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The visualizer is inconsistent in how it visualizes variables going out of scope. In some instances, a variable going out of scope will be treated as such and will disappear once the visualizer steps out of the block the variable was defined in. In other cases, like in our example with a for loop, the variable persists after the block is exited.
Describe the bug
The visualizer is inconsistent in how it visualizes variables going out of scope. In some instances, a variable going out of scope will be treated as such and will disappear once the visualizer steps out of the block the variable was defined in. In other cases, like in our example with a for loop, the variable persists after the block is exited.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
We expect c to not be in scope after the for loop exits.
Here is a program that works as expected:
where x will not be in scope after the line
int b = 1;
is executed.Screenshots
Failing program:
Sample working program:
The text was updated successfully, but these errors were encountered: